hubl/Makefile

36 lines
755 B
Makefile
Raw Normal View History

2018-09-07 17:53:41 +00:00
default: build
2018-09-06 09:25:52 +00:00
config.pug:
cp config-sample.pug config.pug
2018-09-07 17:53:41 +00:00
node_modules:
npm install
2018-09-06 09:25:52 +00:00
2018-09-07 17:53:41 +00:00
install: node_modules
2018-09-06 09:25:52 +00:00
git submodule update --init --recursive
2018-09-07 17:53:41 +00:00
dist/css/hd-app.css: $(wildcard src/scss/*.scss)
npx node-sass src/scss/main.scss dist/css/hd-app.css --source-map true
index.html: config.pug index.pug $(wildcard src/html/*.pug)
npx pug --pretty index.pug
build: index.html dist/css/hd-app.css
build-prod: index.html
npx node-sass src/scss/main.scss dist/css/hd-app.css --output-style compressed
watch:
@echo 'watching for change'
@echo 'press ctrl+C to stop'
@while true; do \
make build --silent; \
sleep 0.5; \
done
2018-09-06 09:25:52 +00:00
serve: dist/css/hd-app.css
php -S 127.0.0.1:8080 router.php
2018-09-07 17:53:41 +00:00
.PHONY: default install build build-prod watch serve