Permalink
Browse files

Add grunt-update-submodules, nix some extra commands (concat/unused r…

…eplace)
  • Loading branch information...
1 parent c981b60 commit 3d43b29cff596b585eec6f22ea349e28e7b65d4b @davidkaneda davidkaneda committed Feb 17, 2013
Showing with 11 additions and 23 deletions.
  1. +9 −22 Gruntfile.coffee
  2. +2 −1 package.json
View
@@ -10,27 +10,16 @@ module.exports = (grunt) ->
grunt.loadNpmTasks "grunt-contrib-jshint"
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-css"
+ grunt.loadNpmTasks "grunt-update-submodules"
grunt.registerMultiTask "rake", "Compile a Ruby Package with Rake", ->
cb = @async() # Tell grunt the task is async
options = @data["options"]
params = grunt.template.process(@data["params"])
exec = require("child_process").exec
child = exec("rake " + 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 "gitmodule", "Update git submodules", ->
- cb = @async() # Tell grunt the task is async
- target = @target or ""
- path = @data["path"] or ("submodules/" + @target)
- exec = require("child_process").exec
- child = exec("git submodule update --init --recursive " + path, (error, stdout, stderr) ->
- console.log "stdout: " + stdout unless not stdout
+ console.log "stdout: " + stdout if stdout
+
if error isnt null
console.log "error: " + error
console.log "stderr: " + stdout
@@ -147,7 +136,6 @@ module.exports = (grunt) ->
files: ["<%= dirs.build %>/test/unit/*.html"]
uglify:
-
options:
globals:
jQTouch: yes
@@ -193,21 +181,20 @@ module.exports = (grunt) ->
globals:
$: true
console: true
-
# Tasks
grunt.registerTask "nuke", ["clean:build", "clean:dist"]
# Git submodule updates
- grunt.registerTask "css", ["clean:css", "gitmodule:recipes", "compass"]
- grunt.registerTask "zepto", ["clean:zepto", "gitmodule:zepto", "rake:zepto", "copy:zepto"]
- grunt.registerTask "jquery-bridge", ["zepto", "gitmodule:zepto", "copy:jquery-bridge", "replace:jquery-bridge"]
+ grunt.registerTask "css", ["clean:css", "update_submodules", "compass"]
+ grunt.registerTask "zepto", ["update_submodules", "rake", "copy:zepto"]
+ grunt.registerTask "jquery-bridge", ["zepto", "copy:jquery-bridge"]
# Tests & checks
grunt.registerTask "test", ["copy:prepare", "qunit"]
grunt.registerTask "cq", ["jshint", "light", "jshint"]
# Full-build tasks
- grunt.registerTask "light", ["nuke", "copy:prepare", "css", "concat"]
- grunt.registerTask "dist", ["nuke", "zepto", "jquery-bridge", "light", "test", "copy:dist", "replace:strip-warnings", "uglify", "replace:distpath", "copy:checkin"]
- grunt.registerTask "full", ["nuke", "light", "cq", "dist"]
+ grunt.registerTask "light", ["nuke", "copy:prepare", "compass"]
+ grunt.registerTask "dist", ["nuke", "zepto", "jquery-bridge", "light", "test", "copy:dist", "uglify"]
+ grunt.registerTask "full", ['update_submodules', "nuke", "light", "cq", "dist"]
View
@@ -45,7 +45,8 @@
"grunt-contrib-jshint": "~0.1.0",
"grunt-contrib-uglify": "~0.1.1rc6",
"grunt-css": "~0.5.3",
- "grunt-contrib-compass": "~0.1.1rc8"
+ "grunt-contrib-compass": "~0.1.1rc8",
+ "grunt-update-submodules": "~0.2.0"
},
"optionalDependencies": {},
"scripts": {

0 comments on commit 3d43b29

Please sign in to comment.