Last active
September 24, 2015 13:22
-
-
Save jdp/2115525997853f35b91a to your computer and use it in GitHub Desktop.
makefile/procfile ultimate front end combo
This file contains 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
JS = $(wildcard scripts/*.js) | |
all: game.js game.js.map game.css rules.html | |
game.js: $(JS) | |
game.js.map: $(JS) | |
%.js %.js.map: | |
closure-compiler --js $(JS) --js_output_file $*.js --create_source_map $*.js.map --source_map_format V3 | |
echo "//# sourceMappingURL=$*.js.map" >> $*.js | |
game.css: styles/*.css | |
cat $^ > $@ | |
rules.html: rules.md | |
pandoc -o $@ $< | |
clean: | |
-rm game.js game.js.map game.css rules.html | |
REMOTEUSER = www-data | |
REMOTEHOST = justinpoliey.com | |
REMOTEDIR = /var/www/justinpoliey.com/ld29/ | |
deploy: index.html game.js game.css rules.html | |
rsync -avz --cvs-exclude --exclude=.git $^ $(REMOTEUSER)@$(REMOTEHOST):$(REMOTEDIR) | |
.PHONY: all clean deploy |
This file contains 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
web: python -m SimpleHTTPServer | |
watch: ls scripts/*.js styles/*.css rules.md | entr make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment