Skip to content

Instantly share code, notes, and snippets.

@innermond
Created January 13, 2015 12:20
Show Gist options
  • Select an option

  • Save innermond/9a92a8bb22f54a9e0f83 to your computer and use it in GitHub Desktop.

Select an option

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
#!/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