2015-09-02 15:08:58 -04:00
|
|
|
ESLINT=./node_modules/.bin/eslint
|
|
|
|
LIVE=./node_modules/.bin/live-server
|
|
|
|
WATCH=./node_modules/.bin/watch
|
|
|
|
WEBPACK=./node_modules/.bin/webpack
|
|
|
|
|
|
|
|
# ------------------------------------
|
|
|
|
|
|
|
|
build:
|
|
|
|
@make clean
|
|
|
|
@make static
|
|
|
|
@make webpack
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf ./build/*.*
|
|
|
|
mkdir -p build
|
|
|
|
|
|
|
|
static:
|
|
|
|
cp -a ./static/. ./build/
|
|
|
|
|
|
|
|
webpack:
|
|
|
|
$(WEBPACK)
|
|
|
|
|
|
|
|
# ------------------------------------
|
|
|
|
|
|
|
|
test:
|
|
|
|
@make lint
|
|
|
|
|
|
|
|
lint:
|
2015-09-02 16:33:31 -04:00
|
|
|
$(ESLINT) ./*.js
|
2015-09-02 16:45:58 -04:00
|
|
|
$(ESLINT) ./src/{.,components/**,mixins,views/**}/*.jsx
|
2015-09-02 15:08:58 -04:00
|
|
|
|
|
|
|
# ------------------------------------
|
|
|
|
|
|
|
|
start:
|
|
|
|
$(LIVE) ./build &
|
2015-09-02 16:33:31 -04:00
|
|
|
make watch &
|
2015-09-02 15:08:58 -04:00
|
|
|
wait
|
|
|
|
|
|
|
|
watch:
|
|
|
|
$(WEBPACK) -d --watch &
|
|
|
|
$(WATCH) "make static" ./static &
|
|
|
|
$(WATCH) "make lint" ./src &
|
|
|
|
wait
|
|
|
|
|
|
|
|
# ------------------------------------
|
|
|
|
|
2015-09-02 16:33:31 -04:00
|
|
|
.PHONY: build clean static webpack test lint start watch
|