Skip to content
Myr

Added -t, --template flag

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent c28f153 · Browse files · 1 file+18 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+18 added−5 removed

  • other:+18 added−5 removed

1 file+18 added−5 removed

modified:bin/express+18 added-5 removed
31 unmodified lines
3233var cssEngine;3435/**36 * Template engine to utilize.37 */3839var templateEngine = 'jade';4041/**42 * Usage documentation.43 */4445var usage = ''46 + '\x1b[1mUsage\x1b[0m: express [options] [PATH]\n'47 + '\n'48 + '\x1b[1mOptions\x1b[0m:\n'43 + ' -s, --sessions Add session support\n'44 + ' -c, --css ENGINE Add stylesheet ENGINE support (less|sass). Defaults to plain css\n'45 + ' -v, --version Output framework version\n'46 + ' -h, --help Output help information\n'49 + ' -s, --sessions Add session support\n'50 + ' -t, --template ENGINE Add template ENGINE support (jade|ejs). Defaults to jade\n'51 + ' -c, --css ENGINE Add stylesheet ENGINE support (less|sass). Defaults to plain css\n'52 + ' -v, --version Output framework version\n'53 + ' -h, --help Output help information\n'54 ;5556/**57 * Jade layout template.
40 unmodified lines
9899var ejsIndex = [100 '<h1><%= title %></h1>'101 , '<p>Welcome to <%= title %></p>'95].join('\n');102 ].join('\n');103104/**105 * Default css template.106 */
130 unmodified lines
237 args.length238 ? (cssEngine = args.shift())239 : abort('--css requires an argument');240 break;241 case '-t':242 case '--template':243 args.length244 ? (templateEngine = args.shift())245 : abort('--template requires an argument');246 break;247 default:248 path = arg;249 }250}
164 unmodified lines