0

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?

Neo M Hacker
  • 899
  • 7
  • 11

1 Answers1

2

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

ne8il
  • 2,427
  • 1
  • 20
  • 18