Grunt task options can work on a global level.
This commit is contained in:
parent
2f2aedb70e
commit
995695bcef
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user