Created
January 13, 2015 12:20
-
-
Save innermond/9a92a8bb22f54a9e0f83 to your computer and use it in GitHub Desktop.
Poor man's way of minifying css files while keep us out of grunt arcanes and alike
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SRC='./src' | |
| DIST='./dist' | |
| CSS='css' | |
| STYLE='style.css' | |
| # minify css files | |
| # destination css file | |
| dist="$DIST/$CSS/$STYLE" | |
| # create destination file | |
| touch $dist | |
| # concatenate using a blank character as separator a list of css files into a collected file | |
| paste -sd'\n' \ | |
| $SRC/$CSS/reset.css \ | |
| $SRC/$CSS/base.css \ | |
| > $dist | |
| # minify concatenated file | |
| yui-compressor -o $dist $dist | |
| echo 'minify css files done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment