Stanislav Zorjan - Stasha - Full Stack Software Engineer and Game Development Hobbyist - Prague


Few days ago I was playing with SASS (Syntactically Awesome Stylesheets).
But Because I'm too lazy :) I just wanted to automate process as much as possible, so I've set up simple ANT project to run SASS from within netbeans.

This way there is no need for opening console, everything simply runs inside netbeans.

Because SASS has two syntaxes SASS and SCSS, ANT project can run watching on both SASS and SCSS or only on one of the file types.

My file structure looks like this:

projectDir
  +css
  +sass
  +scss
   build.xml (ant build script)


And the ANT build script:


<?xml version="1.0" encoding="UTF-8"?>
<project name="Sass Runner" default="WATCH SASS" basedir=".">

	<target name="WATCH SASS">
		<exec executable="cmd">
			<arg value="/c"/>
			<arg value="sass --watch sass:css"/>
		</exec>
	</target>

	<target name="WATCH SCSS">
		<exec executable="cmd">
			<arg value="/c"/>
			<arg value="sass --watch scss:css"/>
		</exec>
	</target>

</project>