Created
November 9, 2012 11:17
-
-
Save simenbrekken/4045202 to your computer and use it in GitHub Desktop.
Makefile extraordinaire
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
| STYLUS = node_modules/.bin/stylus | |
| COFFEE = node_modules/.bin/coffee | |
| UGLIFY = node_modules/.bin/uglifyjs | |
| SPRITER = node_modules/.bin/spriter | |
| RETINA = node_modules/.bin/retina | |
| SCRIPTS = $(shell find src/scripts -name "*.coffee") | |
| STYLES = $(shell find src/styles -name "*.styl") | |
| SPRITES = $(shell find css/images/generated/sprites -name "*.png") | |
| all: css js | |
| css: lib/app.css $(STYLES) | |
| js: lib/vendor-head.js lib/vendor.js lib/app.js $(SCRIPTS) | |
| dist: lib/vendor-head.min.js lib/vendor.min.js lib/app.min.js lib/app.min.css | |
| lib/%.js: src/scripts/%.coffee | |
| $(COFFEE) -bc $< > $@ | |
| lib/%.min.js: lib/%.js | |
| $(UGLIFY) -nc $< > $@ | |
| lib/%.css: src/styles/%.styl | |
| $(STYLUS) < $< > $@ | |
| lib/%.min.css: lib/%.css | |
| $(STYLUS) -c < $< > $@ | |
| # $(RETINA) $< > $@ | |
| # $(SPRITER) $< > $@ | |
| optipng -o7 -quiet $(SPRITES) | |
| advdef -z -4 -q $(SPRITES) | |
| lib/vendor.js: \ | |
| vendor/jquery-1.8.2.js | |
| cat $^ > $@ | |
| lib/vendor-head.js: \ | |
| vendor/modernizr-2.6.2.js \ | |
| cat $^ > $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment