From 76cb3c10646e2c863cbee4686d20b68a02051081 Mon Sep 17 00:00:00 2001 From: David Kaneda Date: Fri, 15 Feb 2013 09:41:56 -0800 Subject: [PATCH] Add grunt-contrib-compass Switch to processing directly in themes/scss instead of build-dir. Switches default mode to "expanded" (will minify later) --- Gruntfile.coffee | 24 ++++++------------------ package.json | 3 ++- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 08d9150d..0f7cd2c7 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -4,27 +4,12 @@ module.exports = (grunt) -> grunt.loadNpmTasks "grunt-contrib-qunit" grunt.loadNpmTasks "grunt-contrib-clean" grunt.loadNpmTasks "grunt-contrib-coffee" + grunt.loadNpmTasks "grunt-contrib-compass" grunt.loadNpmTasks "grunt-contrib-copy" grunt.loadNpmTasks "grunt-contrib-concat" grunt.loadNpmTasks "grunt-contrib-jshint" grunt.loadNpmTasks "grunt-css" - grunt.registerMultiTask "compass", "Compile sass with compass", -> - - # roll our own, because I couldn't find -l options to the `contrib` version - cb = @async() # Tell grunt the task is async - options = @data["options"] or {} - params = grunt.template.process(@data["params"]) - exec = require("child_process").exec - console.log "compass " + params + "" - child = exec("compass " + params + "", options, (error, stdout, stderr) -> - console.log "stdout: " + stdout unless not stdout - if error isnt null - console.log "error: " + error - console.log "stderr: " + stdout - cb() # Execute the callback when the async task is done - ) - grunt.registerMultiTask "rake", "Compile a Ruby Package with Rake", -> cb = @async() # Tell grunt the task is async options = @data["options"] @@ -164,8 +149,11 @@ module.exports = (grunt) -> cwd: "submodules/zepto" compass: - all: - params: "compile -l <%= dirs.build %>/themes/compass-recipes/ --sass-dir <%= dirs.build %>/themes/scss --css-dir <%= dirs.build %>/themes/css --output-style compressed --environment production -q" + compile: + options: + load: 'themes/compass-recipes/' + sassDir: 'themes/scss' + cssDir: 'themes/css' lint: files: ["src/jqtouch.js"] diff --git a/package.json b/package.json index 4e567dcd..5225fd64 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,8 @@ "grunt-contrib-lint": "~0.5.0", "grunt-contrib-mincss": "~0.4.0", "grunt-contrib-jshint": "~0.1.0", - "grunt-css": "~0.5.3" + "grunt-css": "~0.5.3", + "grunt-contrib-compass": "~0.1.1rc8" }, "optionalDependencies": {}, "scripts": {