Skip to content

Commit

Permalink
Add grunt-contrib-compass
Browse files Browse the repository at this point in the history
Switch to processing directly in themes/scss instead of build-dir. Switches default mode to "expanded" (will minify later)
  • Loading branch information
davidkaneda committed Feb 15, 2013
1 parent 356208d commit 76cb3c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
24 changes: 6 additions & 18 deletions Gruntfile.coffee
Expand Up @@ -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"]
Expand Down Expand Up @@ -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"]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -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": {
Expand Down

0 comments on commit 76cb3c1

Please sign in to comment.