Skip to content
Myr

Merge branch 'master' of github.com:visionmedia/express

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 · parents 0e4e050, f640d09 · Browse files · 1 file+33 added−0 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+33 added−0 removed

  • other:+33 added−0 removed

1 file+33 added−0 removed

modified:bin/express+33 added
14 unmodified lines
15program16 .version(express.version)17 .option('-s, --sessions', 'add session support')18 .option('-e, --ejs', 'add ejs support (defaults to jade)')19 .option('-J, --jshtml', 'add jshtml support (defaults to jade)')20 .option('-S, --stylus', 'add stylus support')21 .parse(process.argv);2223// Path
3 unmodified lines
27// Template engine2829program.template = 'jade';30if (program.ejs) program.template = 'ejs';31if (program.jshtml) program.template = 'jshtml';3233// Stylesheet engine3435program.css = program.stylus
48 unmodified lines
84 , '<p>Welcome to <%= title %></p>'85 ].join('\n');8687/**88 * JSHTML layout template.89 */9091var jshtmlLayout = [92 '<!DOCTYPE html>'93 , '<html>'94 , ' <head>'95 , ' <title> @write(title) </title>'96 , ' <link rel=\'stylesheet\' href=\'/stylesheets/style.css\' />'97 , ' </head>'98 , ' <body>'99 , ' @write(body)'100 , ' </body>'101 , '</html>'102].join('\n');103104/**105 * JSHTML index template.106 */107108var jshtmlIndex = [109 '<h1>@write(title)</h1>'110 , '<p>Welcome to @write(title)</p>'111 ].join('\n');112113/**114 * Default css template.115 */116117var css = [
147 unmodified lines
265 case 'jade':266 write(path + '/views/layout.jade', jadeLayout);267 write(path + '/views/index.jade', jadeIndex);268 break;269 case 'jshtml':270 write(path + '/views/layout.jshtml', jshtmlLayout);271 write(path + '/views/index.jshtml', jshtmlIndex);272 break;273274 }275 });276277 // CSS Engine support
89 unmodified lines