25 lines
717 B
Makefile
25 lines
717 B
Makefile
|
HOST ?= localhost
|
||
|
|
||
|
.PHONY: build dev watch serve-and-watch
|
||
|
build: node_modules dist/index.html dist/styles.css dist/main.js
|
||
|
|
||
|
node_modules: package.json yarn.lock ; yarn install
|
||
|
|
||
|
dev: build node_modules
|
||
|
./node_modules/.bin/elm-live src/Main.elm --host="${HOST}" --dir=dist --hot --start-page=index.html -- --debug --output=dist/main.js
|
||
|
|
||
|
reactor: node_modules ; yarn elm reactor
|
||
|
watch: node_modules ; fswi "make build" src
|
||
|
|
||
|
dist/main.js: node_modules dist src/Main.elm
|
||
|
yarn elm make --output=dist/main.js src/Main.elm
|
||
|
|
||
|
dist/index.html: dist src/index.html
|
||
|
cp src/index.html dist/
|
||
|
|
||
|
dist/styles.css: node_modules dist src/styles.styl
|
||
|
yarn stylus src/styles.styl -o dist/
|
||
|
|
||
|
dist: ; mkdir -p dist/
|
||
|
clean: ; rm -rf dist/
|