Skip to content

Instantly share code, notes, and snippets.

@sea-witch
Created September 22, 2016 12:21
Show Gist options
  • Save sea-witch/3c8097e973a887883e636c5122e2e93b to your computer and use it in GitHub Desktop.
Save sea-witch/3c8097e973a887883e636c5122e2e93b to your computer and use it in GitHub Desktop.
HTML_SRC=src/index.html
ELM_SRC=src/Main.elm
DIST=public
RIGHT_NOW=$(shell date "+%B %d, %Y at %H:%M:%S")
TIMESTAMP="<!-- Created at $(RIGHT_NOW) -->\n"
all: public index.html main.js
public:
@ mkdir $(DIST)
index.html:
@ echo $(TIMESTAMP) > $(DIST)/$@
@ cat $(HTML_SRC) >> $(DIST)/$@
main.js:
elm-make $(ELM_SRC) --output $(DIST)/$@
clean:
@ rm -rf $(DIST)
.PHONY: all clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment