umbo

commit 5241dd56218931841ee090efceeb3a193451dcaf

Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>

Throw a make file for making stuff up

 Makefile | 31 +++++++++++++++++++++++++++++++


diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..8b6dd21a627fd9097ed61d6c3a0c34c0db347388
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+__NAME__ = umbo.css
+__MINIFIED_NAME__=umbo.min.css
+
+source = src/normalize.css \
+		 src/foundation.css \
+		 src/grid.css \
+		 src/forms.css \
+		 src/buttons.css
+
+all: $(__NAME__)
+
+$(__NAME__):
+	@printf 'CC -> \t$(source)\n'
+	cat $(source) > $@
+	cp $@ example/
+
+minify:
+	cp $(__NAME__) $(__MINIFIED_NAME__)
+	@# remove css comments
+	sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' -i $(__MINIFIED_NAME__)
+	@# remove leading spaces and tabs
+	sed 's/^\s*//' -i $(__MINIFIED_NAME__)
+	@# remove trailing spaces, tabs, and newline
+	sed 's/\s*$$//' -i $(__MINIFIED_NAME__)
+	@# remove newline
+	tr --delete '\n' < $(__MINIFIED_NAME__) > tmp.css
+	mv tmp.css $(__MINIFIED_NAME__)
+	cp $(__MINIFIED_NAME__) example/
+
+clean:
+	rm -rf $(__NAME__) example/$(__NAME__) $(__MINIFIED_NAME__) example/$(__MINIFIED_NAME__)