-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
51 lines (43 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.PHONY: all
all: documentation.json examples
.PHONY: examples
examples: docs-examples sample-website
.PHONY: docs-examples
docs-examples: examples/docs/index.html
examples/docs/index.html: $(shell find . -type f -name '*.elm')
cd examples/docs && \
elm-make --warn \
src/Examples/Group.elm \
src/Examples/Slice.elm \
src/Examples/Readme.elm
.PHONY: sample-website
sample-website: examples/website/app.js
examples/website/app.js: $(shell find . -type f -name '*.elm')
cd examples/website && \
elm-make --warn src/Main.elm --output app.js
documentation.json: $(shell find ./src -type f -name '*.elm')
elm-make --docs=documentation.json
.PHONY: clean
clean:
rm -rf elm-stuff/build-artifacts \
examples/docs/elm-stuff/build-artifacts \
examples/docs/index.html \
examples/website/elm-stuff/build-artifacts \
examples/website/app.js \
documentation.json
.PHONY: publish-example
publish-example: sample-website
mkdir -p publish
cp examples/website/app.js publish/app.js
cp examples/website/index.html publish/index.html
git stash
git checkout gh-pages
git pull
cp publish/app.js .
cp publish/index.html .
git add app.js index.html
git commit -m "Update example."
git push origin gh-pages
git checkout -
rm -rf publish
git stash pop