noredink-ui/Makefile

35 lines
806 B
Makefile
Raw Normal View History

2018-03-28 05:28:49 +03:00
NPM_PREFIX=$(realpath node_modules)
PATH:=${NPM_PREFIX}/.bin:${PATH}
.PHONY: test
2018-03-28 01:00:46 +03:00
test: setup styleguide-app/elm.js
2018-03-28 05:28:49 +03:00
elm-package diff
elm-format --validate src tests styleguide-app
elm-test
.PHONY: test
clean:
2018-03-28 05:37:41 +03:00
rm -rf node_modules styleguide-app/elm.js $(shell find . -type d -name 'elm-stuff')
2018-03-28 05:42:59 +03:00
styleguide-app/elm.js: styleguide-app/elm-stuff styleguide-app/**/*.elm
2018-03-28 05:28:49 +03:00
cd styleguide-app; elm-make Main.elm --output=elm.js
2018-03-28 01:00:46 +03:00
# plumbing
.PHONY: setup
2018-03-28 01:00:46 +03:00
setup: node_modules elm-stuff tests/elm-stuff styleguide-app/elm-stuff
node_modules: package.json
npm install
touch -m $@
.NOTPARALLEL: elm-stuff
2018-03-28 06:00:36 +03:00
elm-stuff: elm-package.json node_modules
2018-03-28 05:28:49 +03:00
elm-package install --yes
touch -m $@
2018-03-28 06:00:36 +03:00
.NOTPARALLEL: %/elm-stuff
%/elm-stuff: %/elm-package.json node_modules
cd $(@D); elm-package install --yes
2018-03-28 01:00:46 +03:00
touch -m $@