scratch-www/Makefile

68 lines
1.2 KiB
Makefile
Raw Normal View History

2015-09-02 15:08:58 -04:00
ESLINT=./node_modules/.bin/eslint
2015-09-21 13:27:21 -04:00
SASSLINT=./node_modules/.bin/sass-lint -v
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 translations
2015-09-02 15:08:58 -04:00
@make webpack
clean:
rm -rf ./build
2015-09-02 15:08:58 -04:00
mkdir -p build
static:
cp -a ./static/. ./build/
translations:
./src/scripts/build-locales locales/translations.json
2015-09-02 15:08:58 -04:00
webpack:
$(WEBPACK)
# ------------------------------------
2015-09-09 16:24:50 -04:00
watch:
$(WATCH) "make clean && make static" ./static &
$(WEBPACK) -d --watch &
wait
stop:
-pkill -f "$(WEBPACK) -d --watch"
-pkill -f "$(WATCH) make clean && make static ./static"
-pkill -f "$(NODE) ./server/index.js"
2015-09-09 16:24:50 -04:00
start:
$(NODE) ./server/index.js
# ------------------------------------
nginx_conf:
node server/nginx.js
# ------------------------------------
2015-09-02 15:08:58 -04:00
test:
@make lint
lint:
2015-09-02 16:33:31 -04:00
$(ESLINT) ./*.js
$(ESLINT) ./server/*.js
$(ESLINT) ./src/*.js
$(ESLINT) ./src/*.jsx
$(ESLINT) ./src/mixins/*.jsx
$(ESLINT) ./src/views/**/*.jsx
$(ESLINT) ./src/components/**/*.jsx
2015-09-21 13:27:21 -04:00
$(SASSLINT) ./src/*.scss
$(SASSLINT) ./src/views/**/*.scss
$(SASSLINT) ./src/components/**/*.scss
2015-09-02 15:08:58 -04:00
# ------------------------------------
2015-09-09 16:24:50 -04:00
.PHONY: build clean static webpack watch stop start nginx_conf test lint