Skip to content
Myr

Added stylus support to express(1) generated app

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 7687299 · Browse files · 1 file+19 added−1 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+19 added−1 removed

  • other:+19 added−1 removed

1 file+19 added−1 removed

modified:bin/express+19 added-1 removed
58 unmodified lines
59 + '\n'60 + '\x1b[1mOptions\x1b[0m:\n'61 + ' -s, --sessions Add session support\n'62 + ' -t, --template ENGINE Add template ENGINE support (jade|ejs). Defaults to jade\n'63 + ' -c, --css ENGINE Add stylesheet ENGINE support (less|sass). Defaults to plain css\n'63 + ' -c, --css ENGINE Add stylesheet ENGINE support (less|sass|stylus). Defaults to plain css\n'64 + ' -v, --version Output framework version\n'65 + ' -h, --help Output help information\n'66 ;67
87 unmodified lines
155 , ' :color #00B7FF'156].join('\n');157158/**159 * Default stylus template.160 */161162var stylus = [163 'body'164 , ' padding 50px'165 , ' font 14px "Lucida Grande", Helvetica, Arial, sans-serif'166 , 'a'167 , ' color #00B7FF'168].join('\n');169170/**171 * App test template.172 */173174var appTest = [
139 unmodified lines
314 mkdir(path + '/public/javascripts');315 mkdir(path + '/public/images');316 mkdir(path + '/public/stylesheets', function(){317 switch (cssEngine) {318 case 'stylus':319 write(path + '/public/stylesheets/style.styl', stylus);320 break;321 case 'less':322 write(path + '/public/stylesheets/style.less', less);323 break;324 case 'sass':
24 unmodified lines
349 case 'sass':350 case 'less':351 app = app.replace('{css}', '\n app.use(express.compiler({ src: __dirname + \'/public\', enable: [\'' + cssEngine + '\'] }));');352 break;353 case 'stylus':354 app = app.replace('{css}', '\n app.use(require(\'stylus\').middleware({ src: __dirname + \'/public\' }));');355 break;356 default:357 app = app.replace('{css}', '');358 }359
105 unmodified lines