From 995695bcef700ed5b0bc7633172845da1834205e Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 7 Sep 2013 13:05:19 +0200 Subject: [PATCH] Grunt task options can work on a global level. --- Gruntfile.coffee | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 753ac3df2..01b005c59 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,21 +1,14 @@ module.exports = (grunt) -> - concatOptions = - process: Object.create(null, data: - get: -> grunt.config 'pkg' - enumerable: true - ) - shellOptions = - stdout: true - stderr: true - failOnError: true - # Project configuration. grunt.initConfig pkg: grunt.file.readJSON 'package.json' concat: + options: process: Object.create(null, data: + get: -> grunt.config 'pkg' + enumerable: true + ) coffee: - options: concatOptions src: [ 'src/General/Config.coffee' 'src/General/Globals.coffee' @@ -46,7 +39,6 @@ module.exports = (grunt) -> ] dest: 'tmp-<%= pkg.type %>/script.coffee' crx: - options: concatOptions files: 'builds/crx/manifest.json': 'src/Meta/manifest.json' 'builds/crx/script.js': [ @@ -55,7 +47,6 @@ module.exports = (grunt) -> 'tmp-<%= pkg.type %>/script.js' ] userscript: - options: concatOptions files: 'builds/<%= pkg.name %>.meta.js': 'src/Meta/metadata.js' 'builds/<%= pkg.name %>.user.js': [ @@ -83,8 +74,11 @@ module.exports = (grunt) -> createTag: false push: false shell: + options: + stdout: true + stderr: true + failOnError: true commit: - options: shellOptions command: [ 'git checkout <%= pkg.meta.mainBranch %>' 'git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."' @@ -92,12 +86,11 @@ module.exports = (grunt) -> 'git tag -af stable-v3 -m "<%= pkg.meta.name %> v<%= pkg.version %>."' ].join ' && ' push: - options: shellOptions command: 'git push origin --tags -f && git push origin --all' watch: + options: + interrupt: true all: - options: - interrupt: true files: [ 'Gruntfile.coffee' 'package.json'