Compiling closure stylesheets in java (like SoyFileSet)

609 views Asked by At

https://developers.google.com/closure/templates/docs/commands explains how to compile Google stylesheets using command line. I was expecting something like SoyFileSet which I can use to compile Google templates. Is there a class similar class like that for compiling stylesheets?

1

There are 1 answers

0
ne8il On

There is a java jar you can run from the command line called closure-stylesheets.jar. You can download it here : https://code.google.com/p/closure-stylesheets/downloads/list

We run it through an Ant task like this:

<target name="closure-stylesheets">
        <java jar="closure-stylesheets/closure-stylesheets.jar" fork="true" failonerror="true">
            <arg line="--output-file ../styles/closure.css"/>
            <arg value="closure-stylesheets/closure-main-def.gss"/>
            <arg value="closure-stylesheets/closure.gss"/>
            <arg value="closure-stylesheets/tree.css"/>
        </java>
</target>

If you are using Soy templates and want to use closure's CSS renaming capabilities, look here (I'm not familiar with using this) : https://code.google.com/p/closure-stylesheets/#Renaming