diff options
| author | rr- <rr-@sakuya.pl> | 2016-04-13 20:06:34 +0200 |
|---|---|---|
| committer | rr- <rr-@sakuya.pl> | 2016-04-13 20:13:10 +0200 |
| commit | 28e85bd21af0f450c776de32a7b77fbe3f2cec86 (patch) | |
| tree | bc41a2ec52bdfaa5773aec17955df1c6f6588df9 /client/build.js | |
| parent | d18a8090b12a59cfd21b0ee9d59c04111cee7241 (diff) | |
client/css: switch to stylus
Diffstat (limited to 'client/build.js')
| -rw-r--r-- | client/build.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/build.js b/client/build.js index 4a13fcb..bab4972 100644 --- a/client/build.js +++ b/client/build.js @@ -91,10 +91,12 @@ function bundleHtml(config) { function bundleCss() { const minify = require('csso').minify; - glob('./css/**/*.css', {}, (er, files) => { + const stylus = require('stylus'); + glob('./css/**/*.styl', {}, (er, files) => { let css = ''; for (const file of files) { - css += fs.readFileSync(file); + css += stylus.render( + fs.readFileSync(file, 'utf-8'), {filename: file}); } fs.writeFileSync('./public/bundle.min.css', minify(css)); console.info('Bundled CSS'); |