2015-09-02 15:08:58 -04:00
|
|
|
ESLINT=./node_modules/.bin/eslint
|
2015-09-04 01:26:56 -04:00
|
|
|
NODE=node
|
2015-09-02 15:08:58 -04:00
|
|
|
WATCH=./node_modules/.bin/watch
|
|
|
|
WEBPACK=./node_modules/.bin/webpack
|
|
|
|
|
|
|
|
# ------------------------------------
|
|
|
|
|
|
|
|
build:
|
|
|
|
@make clean
|
|
|
|
@make static
|
|
|
|
@make webpack
|
|
|
|
|
|
|
|
clean:
|
2015-09-04 01:26:56 -04:00
|
|
|
rm -rf ./build
|
2015-09-02 15:08:58 -04:00
|
|
|
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-04 01:26:56 -04:00
|
|
|
$(ESLINT) ./server/*.js
|
2015-09-02 17:40:14 -04:00
|
|
|
$(ESLINT) ./src/*.jsx
|
|
|
|
$(ESLINT) ./src/mixins/*.jsx
|
|
|
|
$(ESLINT) ./src/views/**/*.jsx
|
|
|
|
$(ESLINT) ./src/components/**/*.jsx
|
2015-09-02 15:08:58 -04:00
|
|
|
|
|
|
|
# ------------------------------------
|
|
|
|
|
|
|
|
watch:
|
2015-09-04 01:26:56 -04:00
|
|
|
$(WATCH) "make clean && make static" ./static &
|
2015-09-02 15:08:58 -04:00
|
|
|
$(WEBPACK) -d --watch &
|
|
|
|
wait
|
|
|
|
|
2015-09-04 01:26:56 -04:00
|
|
|
start:
|
2015-09-04 11:26:18 -04:00
|
|
|
$(NODE) ./server/index.js
|
2015-09-04 01:26:56 -04:00
|
|
|
|
2015-09-02 15:08:58 -04:00
|
|
|
# ------------------------------------
|
|
|
|
|
2015-09-04 01:26:56 -04:00
|
|
|
.PHONY: build clean static webpack test lint watch start
|