Permalink
Browse files

Assets (less/sass) recipe

  • Loading branch information...
1 parent 15a9888 commit 2f9430e4abac3eeb1d637bdeb6cfea10fa0b790b @j15e j15e committed Feb 3, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 assets.rb
View
14 assets.rb
@@ -0,0 +1,14 @@
+set :lessc_path, "~/node_modules/less/bin/lessc"
+set :sass_path, "sass"
+
+namespace :assets do
+ desc "Compile LESS files"
+ task :less_compile, :roles => :app do
+ run "find #{release_path} -name \"*.less\" | xargs -I {} #{lessc_path} -x {} {}.css"
+ end
+
+ desc "Compile SASS files"
+ task :sass_compile, :roles => :app do
+ run "find #{release_path} -name \"*.scss\" -o -name \"*.sass\" | xargs -I {} #{sass_path} -x {} {}.css"
+ end
+end

0 comments on commit 2f9430e

Please sign in to comment.