Permalink
Browse files

Added a cli option to specify an alternate template directory

  • Loading branch information...
hsilberman
hsilberman committed May 19, 2011
1 parent 94a1c45 commit 27cec2c8a6430c6a190635918d458600546570af
Showing with 6 additions and 0 deletions.
  1. +1 −0 Readme.md
  2. +5 −0 bin/ngen
View
@@ -15,6 +15,7 @@
Options:
-t, --template <name> Use the template <name>
+ -d, --directory <path> Use the template directory <path>
-V, --version Output the current version
-h, --help Display help information
View
@@ -48,6 +48,7 @@ var usage = [
, ' Options:'
, ''
, ' -t, --template <name> Use the template <name>'
+ , ' -d, --directory <path> Use the template directory <path>'
, ' -V, --version Output the current version'
, ' -h, --help Display help information'
, ''
@@ -202,6 +203,10 @@ while (args.length) {
case '--template':
template = requireArgument(arg);
break;
+ case '-d':
+ case '--directory':
+ templates = fs.realpathSync( requireArgument(arg) );
+ break;
default:
dest = arg;
}

0 comments on commit 27cec2c

Please sign in to comment.