Skip to content
Myr

Moved a helper function to the helpers section

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

authored by visionmedia · committed by visionmedia · parent c34af4b · Browse files · 1 file+12 added−12 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+12 added−12 removed

  • other:+12 added−12 removed

1 file+12 added−12 removed

modified:bin/express+12 added-12 removed
37 unmodified lines
38 }39 })40}4142function createTemplateIn(dir, mode) {43 fs.writeFile(dir + '/app.js', '// your app here')44 fs.mkdir(dir + '/views', mode)45 fs.mkdir(dir + '/public', mode, function(err){46 if (err) throw err47 fs.mkdir(dir + '/public/javascripts', mode)48 fs.mkdir(dir + '/public/stylesheets', mode)49 fs.mkdir(dir + '/public/images', mode)50 })51}5253// Setup template5455fs.readdir(dir, function(err, files){56 if (err) throw err
2 unmodified lines
59 if (ok) createTemplateIn(dir, 0666)60 })61 else62 createTemplateIn(dir, 0666)52})5354function createTemplateIn(dir, mode) {55 fs.writeFile(dir + '/app.js', 'test')56 fs.mkdir(dir + '/views', mode)57 fs.mkdir(dir + '/public', mode, function(err){58 if (err) throw err59 fs.mkdir(dir + '/public/javascripts', mode)60 fs.mkdir(dir + '/public/stylesheets', mode)61 fs.mkdir(dir + '/public/images', mode)62 })63}63})