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)
|
command: 'node_modules/.bin/coffee tools/templates.coffee src/meta/jshint.json .jshintrc'.replace(/\//g, path.sep)
|
||||||
crx:
|
crx:
|
||||||
command: """
|
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 -c tmp/script-crx.coffee
|
||||||
node_modules/.bin/coffee --no-header -o tmp -c src/General/eventPage.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
|
node_modules/.bin/jshint tmp/script-crx.js tmp/eventPage.js
|
||||||
""".split('\n').join('&&').replace(/\//g, path.sep)
|
""".split('\n').join('&&').replace(/\//g, path.sep)
|
||||||
'templates-crx-meta':
|
'templates-crx-meta':
|
||||||
command: """
|
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/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 crx <%= 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)
|
""".split('\n').join('&&').replace(/\//g, path.sep)
|
||||||
userscript:
|
userscript:
|
||||||
command: """
|
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/coffee --no-header -c tmp/script-userscript.coffee
|
||||||
node_modules/.bin/jshint tmp/script-userscript.js
|
node_modules/.bin/jshint tmp/script-userscript.js
|
||||||
""".split('\n').join('&&').replace(/\//g, path.sep)
|
""".split('\n').join('&&').replace(/\//g, path.sep)
|
||||||
'templates-userscript-meta':
|
'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:
|
markdown:
|
||||||
command: 'node tools/markdown.js'
|
command: 'node tools/markdown.js'
|
||||||
commit:
|
commit:
|
||||||
|
|||||||
@ -85,9 +85,9 @@ pkg.grunt = file:
|
|||||||
readJSON: (filename) -> JSON.parse read filename
|
readJSON: (filename) -> JSON.parse read filename
|
||||||
expand: glob.sync
|
expand: glob.sync
|
||||||
|
|
||||||
pkg.type = process.argv[4]
|
for arg in process.argv[4..]
|
||||||
pkg.channel = process.argv[5]
|
[key, val] = arg.match(/(.*?)=(.*)/)[1..]
|
||||||
pkg.tests_enabled = !!process.argv[6]
|
pkg[key] = val
|
||||||
|
|
||||||
dir = path.dirname process.argv[3]
|
dir = path.dirname process.argv[3]
|
||||||
fs.mkdirSync dir unless fs.existsSync dir
|
fs.mkdirSync dir unless fs.existsSync dir
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user