Last active
August 29, 2015 14:01
-
-
Save jhawthorn/8f6c8d0d0abdbfe2ce0c to your computer and use it in GitHub Desktop.
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
HTMLFILES=www/index.html $(wildcard www/articles/*.html) | |
TXTFILES=$(wildcard www/*.html) | |
CSSFILES = $(wildcard www/assets/*.css) | |
HTMLTARGETS=$(HTMLFILES:www/%.html=build/%.html) | |
all: build | |
node_modules: | |
npm install minify | |
build/assets/site.css: $(CSSFILES) node_modules | |
@mkdir -p $(dir $@) | |
cat $(CSSFILES) | node_modules/.bin/minify -css > $@ | |
build/%.html: www/%.html ga.txt node_modules | |
@mkdir -p $(dir $@) | |
cat $< ga.txt | node_modules/.bin/minify -html > $@ | |
build: build/assets/site.css $(HTMLTARGETS) | |
clean: | |
rm -Rf build/ node_modules | |
.PHONY: all build clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment