boilerplate

This commit is contained in:
Robin Appelman 2017-04-14 20:31:30 +02:00
commit abfdb9d2d9
9 changed files with 224 additions and 0 deletions

21
Makefile Normal file
View file

@ -0,0 +1,21 @@
all: build
.PHONY: clean
clean:
rm -rf dist
rm -rf node_modules
node_modules: package.json
npm install
sources=$(wildcard js/*) $(wildcard js/*/*) $(wildcard css/*/*) $(wildcard css/*)
.PHONY: build
build: node_modules $(sources)
node node_modules/.bin/webpack --colors --display-error-details --config webpack.prod.config.js
build/js/main.js: build
.PHONY: watch
watch: node_modules
node node_modules/.bin/webpack-dev-server --hot --inline --config webpack.dev.config.js