Skip to content

Commit

Permalink
Add cmd parameter --wrapper(-w) for use different wrapper for compile…
Browse files Browse the repository at this point in the history
…d template
  • Loading branch information
ulion committed Apr 27, 2015
1 parent 3ea67a0 commit 358e61c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/precompile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ var optimist = require('optimist')
.string('name')
.alias('n', 'n')

.describe('wrapper', 'Specify the wrapper used for the compiled template. "global" for browser as js to be included, "cjs-module" for server side as module')
.string('wrapper')
.default('wrapper', 'global')
.alias('w', 'wrapper')

.describe('include', 'Include a file or folder which match the regex but would otherwise be excluded. You can use this flag multiple times')
.string('include' )
.default('include', ['\\.html$', '\\.jinja$'])
Expand Down Expand Up @@ -56,6 +61,7 @@ console.log(precompile(argv._[0], {
env : env,
force : argv.force,
name : argv.name,
wrapper : argv.wrapper,

include : [].concat(argv.include),
exclude : [].concat(argv.exclude)
Expand Down

0 comments on commit 358e61c

Please sign in to comment.