mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-28 10:17:49 +03:00
43 lines
937 B
Makefile
43 lines
937 B
Makefile
NPM_PREFIX=$(realpath node_modules)
|
|
PATH:=${NPM_PREFIX}/.bin:${PATH}
|
|
|
|
default: test format diff styleguide-app/elm.js
|
|
|
|
.PHONY: diff
|
|
diff: node_modules
|
|
elm-package diff
|
|
|
|
.PHONY: test
|
|
test: elm-stuff tests/elm-stuff node_modules
|
|
elm-test
|
|
|
|
.PHONY: format
|
|
format: node_modules
|
|
elm-format --validate src tests styleguide-app
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf node_modules styleguide-app/elm.js $(shell find . -type d -name 'elm-stuff')
|
|
|
|
styleguide-app/elm.js: styleguide-app/elm-stuff styleguide-app/**/*.elm
|
|
cd styleguide-app; elm-make Main.elm --output=elm.js
|
|
|
|
# plumbing
|
|
|
|
.PHONY: setup
|
|
setup: node_modules elm-stuff tests/elm-stuff styleguide-app/elm-stuff
|
|
|
|
node_modules: package.json
|
|
npm install
|
|
touch -m $@
|
|
|
|
.NOTPARALLEL: elm-stuff
|
|
elm-stuff: elm-package.json node_modules
|
|
elm-package install --yes
|
|
touch -m $@
|
|
|
|
.NOTPARALLEL: %/elm-stuff
|
|
%/elm-stuff: %/elm-package.json node_modules
|
|
cd $(@D); elm-package install --yes
|
|
touch -m $@
|