diff options
| author | kdam0 <kumar.damani@mail.utoronto.ca> | 2017-04-15 01:16:07 +0000 |
|---|---|---|
| committer | kdam0 <kumar.damani@mail.utoronto.ca> | 2017-04-15 01:16:07 +0000 |
| commit | bd692ffbc8327c2ae6bec1376554ae569eb44e88 (patch) | |
| tree | bb3275bb9e681165a642cf22c2e4c89e615d7219 /bin | |
| parent | c1bcbbec851d509ee911016536a5e684eac4ee43 (diff) | |
now using minified css on production.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/build-css | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/build-css b/bin/build-css new file mode 100755 index 0000000..a1d8681 --- /dev/null +++ b/bin/build-css @@ -0,0 +1,18 @@ +#!/bin/sh +echo Compressing CSS Files... +saved=0 +for f in `find assets/css/ -name "*.css" -not -name "*.min.css"`; +do + target=${f%.*}.min.css + echo "- $f to $target" + node_modules/node-sass/bin/node-sass $f $target --output-style compressed +done + +# move the minified files to min/ folder +for f_min in `find assets/css/ -maxdepth 1 -name "*.min.css"`; +do + echo "- moving $f_min to min/$f" + mv $f_min assets/css/min +done + +echo "Done !" |
