Skip to content

Commit

Permalink
added back options support to jade(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Aug 26, 2011
1 parent a1c60bc commit 1413e7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/jade
Expand Up @@ -22,7 +22,7 @@ var options = {};
program
.version(jade.version)
.usage('[options] [dir|file ...]')
.option('-o, --options <str>', 'javascript options object')
.option('-o, --obj <str>', 'javascript options object')
.option('-O, --out <dir>', 'output the compiled html to <dir>')

program.on('--help', function(){
Expand All @@ -44,6 +44,10 @@ program.on('--help', function(){

program.parse(process.argv);

// options given, parse them

if (program.obj) options = eval('(' + program.obj + ')');

// left-over args are file paths

var files = program.args;
Expand Down

0 comments on commit 1413e7e

Please sign in to comment.