Permalink
Browse files

AUI-750 Add support for SASS and Compass trough JAZZ library

  • Loading branch information...
1 parent b3e53b5 commit 3a9fc189b5806f60af496c551e62d838082ef5d6 @eduardolundgren eduardolundgren committed Nov 1, 2012
Showing with 18 additions and 73 deletions.
  1. +5 −3 .gitignore
  2. +1 −1 build.xml
  3. +1 −1 resources/builder/bootstrap.xml
  4. +11 −68 resources/builder/sass.xml
View
@@ -1120,8 +1120,7 @@ build_rollup_tmp/
/lib/builder/componentbuild/templates/yui3/rollup/build_tmp
/lib/builder/componentbuild/templates/yui3/rollup/build_rollup_tmp
/lib/builder/componentbuild/templates/yui3/rollup/__MACOSX
-/lib/jruby.jar
-/lib/ruby-gems.jar
+/lib/jazz.jar
# /resources/
/resources/.git
/resources/build_tmp
@@ -1970,4 +1969,7 @@ build_rollup_tmp/
/src/aui-tree/js/build_rollup_tmp
/src/aui-tree/js/__MACOSX
/alloy-*.zip
-/.htaccess
+/.htaccess
+
+.ruby-gems
+.sass-cache
View
@@ -161,7 +161,7 @@
</target>
<target name="build-skins">
- <antcall target="build-ruby-gems"/>
+ <antcall target="build-jazz"/>
<sass-parse folder.sass="${project.dir}/src/${build.aui.prefix}aui-skin-base/css" />
@@ -33,7 +33,7 @@
<import file="macrolib.xml" description="Alloy Macrodef Utilities"/>
<import file="sass.xml" description="Alloy Sass Compiler"/>
- <target name="all" depends="build-ruby-gems, sass-parse, YuiSharedTargets.all, sass-postclean, postclean" />
+ <target name="all" depends="build-jazz, sass-parse, YuiSharedTargets.all, sass-postclean, postclean" />
<!-- if we try to pass clean at the very end of the depends,
it will be ignored because local calls it first -->
@@ -3,41 +3,16 @@
<basename property="ant.file.basename" file="${ant.file}" />
- <target name="build-ruby-gems">
+ <target name="build-jazz">
<if>
<not>
- <available file="${project.dir}/lib/ruby-gems.jar" />
+ <available file="${project.dir}/lib/jazz.jar" />
</not>
<then>
- <tstamp>
- <format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
- </tstamp>
-
- <get
- dest="${project.dir}/lib/jruby.jar"
- src="http://jruby.org.s3.amazonaws.com/downloads/1.6.7.2/jruby-complete-1.6.7.2.jar"
- />
-
- <mkdir dir="${tstamp.value}/compass" />
-
<get
- dest="${tstamp.value}/compass/compass-0.12.2.gem"
- src="http://rubygems.org/downloads/compass-0.12.2.gem"
+ dest="${project.dir}/lib"
+ src="http://cloud.github.com/downloads/eduardolundgren/jazz/jazz.jar"
/>
-
- <java
- fork="true"
- jar="${project.dir}/lib/jruby.jar"
- >
- <arg line="-S gem install -i ./${tstamp.value}/output ${tstamp.value}/compass/compass-0.12.2.gem --no-rdoc --no-ri" />
- </java>
-
- <jar
- basedir="${tstamp.value}/output"
- jarfile="${project.dir}/lib/ruby-gems.jar"
- />
-
- <delete dir="${tstamp.value}" />
</then>
</if>
</target>
@@ -71,46 +46,14 @@
</then>
</if>
- <property name="file.path.pattern" value="@{folder.sass}/**/**.css" />
-
- <path id="jruby">
- <fileset file="${project.dir}/lib/jruby.jar"/>
- <fileset file="${project.dir}/lib/ruby-gems.jar"/>
- </path>
-
- <script language="ruby" classpathref="jruby">
- <![CDATA[
- require 'rubygems'
- require 'java'
- require 'compass'
-
- filePathPattern = $project.getProperty('file.path.pattern')
- files = Dir.glob(filePathPattern)
-
- Compass.add_project_configuration
-
- load_paths = []
-
- load_paths += Compass.configuration.sass_load_paths
-
- files.each do | file |
- fileContent = File.read(file)
-
- engine = Sass::Engine.new(
- fileContent,
- {
- :filename => file,
- :syntax => :scss,
- :load_paths => load_paths,
- :ugly => true,
- :style => :expanded
- }
- )
+ <property name="file.path.pattern" value='"@{folder.sass}/**/**.css"' />
- File.open(file, 'w') { |f| f.write(engine.render) }
- end
- ]]>
- </script>
+ <java
+ fork="true"
+ jar="${project.dir}/lib/jazz.jar"
+ >
+ <arg line="${file.path.pattern}" />
+ </java>
</then>
</if>
</sequential>

0 comments on commit 3a9fc18

Please sign in to comment.