Permalink
Browse files

added back options support to jade(1)

  • Loading branch information...
1 parent a1c60bc commit 1413e7e8bc4a2018de9f3c47ab7b6e61760d013d @tj tj committed Aug 26, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 bin/jade
View
@@ -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(){
@@ -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;

0 comments on commit 1413e7e

Please sign in to comment.