default: build config.pug: @cp -n config-sample.pug config.pug node_modules: npm install install: node_modules git submodule update --init --recursive update: cd dist/lib/sib-chat; \ git pull origin master cd dist/lib/sib-core; \ git pull origin master cd dist/lib/sib-router; \ git pull origin master dist/css/hd-app.css: $(wildcard src/scss/*.scss) npx node-sass src/scss/main.scss dist/css/hd-app.css --source-map true || touch dist/css/hd-app.css index.html: config.pug index.pug $(wildcard src/pug/*.pug) npx pug --pretty index.pug || touch index.html build: index.html dist/css/hd-app.css prod: npx pug index.pug 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 serve: dist/css/hd-app.css php -S 127.0.0.1:8080 router.php dev-mt: watch serve dev: @$(MAKE) dev-mt -j --no-print-directory .PHONY: default install build build-prod watch serve