Skip to content

Commit

Permalink
Added a cli option to specify an alternate template directory
Browse files Browse the repository at this point in the history
  • Loading branch information
hsilberman committed May 19, 2011
1 parent 94a1c45 commit 27cec2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Readme.md
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions bin/ngen
Expand Up @@ -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'
, ''
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 27cec2c

Please sign in to comment.