Make templates.coffee take keyword arguments.
This commit is contained in:
parent
f4b5d65a53
commit
8ae1a0df96
@ -115,24 +115,24 @@ module.exports = (grunt) ->
|
||||
command: 'node_modules/.bin/coffee tools/templates.coffee src/meta/jshint.json .jshintrc'.replace(/\//g, path.sep)
|
||||
crx:
|
||||
command: """
|
||||
node_modules/.bin/coffee tools/templates.coffee tmp/script.coffee tmp/script-crx.coffee crx - <%= pkg.tests_enabled || "" %>
|
||||
node_modules/.bin/coffee tools/templates.coffee tmp/script.coffee tmp/script-crx.coffee type=crx tests_enabled=<%= pkg.tests_enabled || "" %>
|
||||
node_modules/.bin/coffee --no-header -c tmp/script-crx.coffee
|
||||
node_modules/.bin/coffee --no-header -o tmp -c src/General/eventPage.coffee
|
||||
node_modules/.bin/jshint tmp/script-crx.js tmp/eventPage.js
|
||||
""".split('\n').join('&&').replace(/\//g, path.sep)
|
||||
'templates-crx-meta':
|
||||
command: """
|
||||
node_modules/.bin/coffee tools/templates.coffee src/meta/updates.xml testbuilds/updates<%= pkg.meta.suffix[pkg.channel] %>.xml crx <%= pkg.channel %>
|
||||
node_modules/.bin/coffee tools/templates.coffee src/meta/manifest.json testbuilds/crx<%= pkg.meta.suffix[pkg.channel] %>/manifest.json crx <%= pkg.channel %>
|
||||
node_modules/.bin/coffee tools/templates.coffee src/meta/updates.xml testbuilds/updates<%= pkg.meta.suffix[pkg.channel] %>.xml type=crx channel=<%= pkg.channel %>
|
||||
node_modules/.bin/coffee tools/templates.coffee src/meta/manifest.json testbuilds/crx<%= pkg.meta.suffix[pkg.channel] %>/manifest.json type=crx channel=<%= pkg.channel %>
|
||||
""".split('\n').join('&&').replace(/\//g, path.sep)
|
||||
userscript:
|
||||
command: """
|
||||
node_modules/.bin/coffee tools/templates.coffee tmp/script.coffee tmp/script-userscript.coffee userscript - <%= pkg.tests_enabled || "" %>
|
||||
node_modules/.bin/coffee tools/templates.coffee tmp/script.coffee tmp/script-userscript.coffee type=userscript tests_enabled=<%= pkg.tests_enabled || "" %>
|
||||
node_modules/.bin/coffee --no-header -c tmp/script-userscript.coffee
|
||||
node_modules/.bin/jshint tmp/script-userscript.js
|
||||
""".split('\n').join('&&').replace(/\//g, path.sep)
|
||||
'templates-userscript-meta':
|
||||
command: 'node_modules/.bin/coffee tools/templates.coffee src/meta/metadata.js testbuilds/<%= pkg.name %><%= pkg.meta.suffix[pkg.channel] %>.meta.js userscript <%= pkg.channel %>'.replace(/\//g, path.sep)
|
||||
command: 'node_modules/.bin/coffee tools/templates.coffee src/meta/metadata.js testbuilds/<%= pkg.name %><%= pkg.meta.suffix[pkg.channel] %>.meta.js type=userscript channel=<%= pkg.channel %>'.replace(/\//g, path.sep)
|
||||
markdown:
|
||||
command: 'node tools/markdown.js'
|
||||
commit:
|
||||
|
||||
@ -85,9 +85,9 @@ pkg.grunt = file:
|
||||
readJSON: (filename) -> JSON.parse read filename
|
||||
expand: glob.sync
|
||||
|
||||
pkg.type = process.argv[4]
|
||||
pkg.channel = process.argv[5]
|
||||
pkg.tests_enabled = !!process.argv[6]
|
||||
for arg in process.argv[4..]
|
||||
[key, val] = arg.match(/(.*?)=(.*)/)[1..]
|
||||
pkg[key] = val
|
||||
|
||||
dir = path.dirname process.argv[3]
|
||||
fs.mkdirSync dir unless fs.existsSync dir
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user