-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (26 loc) · 926 Bytes
/
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
OUTFILE=./assets/bundle.css
dist: build
@echo "Copying files..."
mkdir -p ./dist/assets/images
cp ./index.html ./dist/index.html
cp ./assets/stars.js ./dist/assets/stars.js
cp ./elm/elm_port.js ./dist/assets/elm_port.js
cp ./assets/bundle.css ./dist/assets/bundle.css
cp ./assets/images/* ./dist/assets/images/
@echo "Done, check ./dist"
build: $(OUTFILE) ./assets/stars.js
./assets/stars.js: elm/src/Stars.elm
@echo "Compiling Elm..."
cd ./elm; elm make src/Stars.elm --optimize --output=./../assets/stars.js
$(OUTFILE): $(wildcard ./assets/css/*.css)
# blazingly fast CSS bundler
@echo "Bundling CSS..."
cat ./assets/css/skeleton.css > $(OUTFILE)
cat ./assets/css/normalize.css >> $(OUTFILE)
cat ./assets/css/star_keyframes.css >> $(OUTFILE)
cat ./assets/css/dos_buttons.css >> $(OUTFILE)
cat ./assets/css/index.css >> $(OUTFILE)
clean:
rm -rf dist
rm -f ./assets/stars.js
rm -f ./assets/bundle.css