scratch-www/Makefile

96 lines
1.7 KiB
Makefile
Raw Normal View History

2015-09-02 15:08:58 -04:00
ESLINT=./node_modules/.bin/eslint
NODE=node
SASSLINT=./node_modules/.bin/sass-lint -v
TAP=./node_modules/.bin/tap
2015-09-02 15:08:58 -04:00
WATCH=./node_modules/.bin/watch
WEBPACK=./node_modules/.bin/webpack
GIT_VERSION=$(shell git rev-parse --verify --short=5 HEAD 2> /dev/null)
GIT_VERSION?=$(WWW_VERSION)
GIT_MESSAGE=$(shell git log -1 --pretty=%s 2> /dev/null)
2015-09-02 15:08:58 -04:00
# ------------------------------------
build:
@make clean
@make translations
2015-09-02 15:08:58 -04:00
@make webpack
@make tag
2015-09-02 15:08:58 -04:00
clean:
rm -rf ./build
rm -rf ./intl
2015-09-02 15:08:58 -04:00
mkdir -p build
mkdir -p intl
2015-09-02 15:08:58 -04:00
deploy:
@make build
2016-04-19 16:35:51 -04:00
@make sync
tag:
echo $(GIT_VERSION) > ./build/version.txt
translations:
./bin/build-locales intl
2015-09-02 15:08:58 -04:00
webpack:
$(WEBPACK) --bail
2015-09-02 15:08:58 -04:00
2016-04-19 16:35:51 -04:00
sync-s3:
$(NODE) ./bin/deploy-to-s3.js
sync-fastly:
$(NODE) ./bin/configure-fastly.js
2016-04-19 16:35:51 -04:00
sync:
@make sync-s3
@make sync-fastly
2015-09-02 15:08:58 -04:00
# ------------------------------------
2015-09-09 16:24:50 -04:00
start:
$(NODE) ./dev-server/index.js
2015-09-09 16:24:50 -04:00
# ------------------------------------
2015-09-02 15:08:58 -04:00
test:
@make lint
@make build
@echo ""
@make unit
@echo ""
@make functional
@echo ""
@make localization
@echo ""
2015-09-02 15:08:58 -04:00
lint:
2015-09-02 16:33:31 -04:00
$(ESLINT) ./*.js
2016-04-18 14:07:27 -04:00
$(ESLINT) ./dev-server/*.js
2016-04-19 10:47:33 -04:00
$(ESLINT) ./bin/**/*.js
$(ESLINT) ./src/*.js
$(ESLINT) ./src/mixins/*.jsx
$(ESLINT) ./src/views/**/*.jsx
$(ESLINT) ./src/components/**/*.jsx
$(ESLINT) ./src/components/**/**/*.jsx
2015-09-21 13:27:21 -04:00
$(SASSLINT) ./src/*.scss
$(SASSLINT) ./src/views/**/*.scss
$(SASSLINT) ./src/components/**/*.scss
$(SASSLINT) ./src/components/**/**/*.scss
2015-09-02 15:08:58 -04:00
unit:
$(TAP) ./test/unit/*.js
functional:
$(TAP) ./test/functional/*.js
integration:
$(TAP) ./test/integration/*.js
localization:
$(TAP) ./test/localization/*.js
2015-09-02 15:08:58 -04:00
# ------------------------------------
.PHONY: build clean deploy static tag translations webpack watch stop start test lint