2015-09-02 15:08:58 -04:00
|
|
|
ESLINT=./node_modules/.bin/eslint
|
2015-09-04 01:26:56 -04:00
|
|
|
NODE=node
|
2015-10-20 12:48:32 -04:00
|
|
|
SASSLINT=./node_modules/.bin/sass-lint -v
|
2016-04-29 14:33:04 -04:00
|
|
|
S3CMD=s3cmd
|
2015-11-09 11:40:36 -05:00
|
|
|
TAP=./node_modules/.bin/tap
|
2015-09-02 15:08:58 -04:00
|
|
|
WATCH=./node_modules/.bin/watch
|
|
|
|
WEBPACK=./node_modules/.bin/webpack
|
|
|
|
|
|
|
|
# ------------------------------------
|
|
|
|
|
|
|
|
build:
|
|
|
|
@make clean
|
2016-01-08 13:50:58 -05:00
|
|
|
@make translations
|
2015-09-02 15:08:58 -04:00
|
|
|
@make webpack
|
|
|
|
|
|
|
|
clean:
|
2015-09-04 01:26:56 -04:00
|
|
|
rm -rf ./build
|
2016-01-06 14:09:32 -05:00
|
|
|
rm -rf ./intl
|
2015-09-02 15:08:58 -04:00
|
|
|
mkdir -p build
|
2016-01-06 14:09:32 -05:00
|
|
|
mkdir -p intl
|
2015-09-02 15:08:58 -04:00
|
|
|
|
2015-11-03 12:51:45 -05:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
@make build
|
2016-04-19 16:35:51 -04:00
|
|
|
@make sync
|
2015-11-03 12:51:45 -05:00
|
|
|
|
2015-10-15 23:01:58 -04:00
|
|
|
translations:
|
2016-01-06 14:09:32 -05:00
|
|
|
./bin/build-locales intl
|
2015-10-15 23:01:58 -04:00
|
|
|
|
2015-09-02 15:08:58 -04:00
|
|
|
webpack:
|
2015-10-20 19:45:01 -04:00
|
|
|
$(WEBPACK) --bail
|
2015-09-02 15:08:58 -04:00
|
|
|
|
2016-04-19 16:35:51 -04:00
|
|
|
sync-s3:
|
2016-05-20 11:36:10 -04:00
|
|
|
$(S3CMD) sync -P --delete-removed --exclude '.DS_Store' --exclude '*.svg' ./build/ s3://$(S3_BUCKET_NAME)/
|
|
|
|
$(S3CMD) sync -P --delete-removed --exclude '*' --include '*.svg' --default-mime-type 'image/svg+xml' ./build/ s3://$(S3_BUCKET_NAME)/
|
2016-04-19 16:35:51 -04:00
|
|
|
|
|
|
|
sync-fastly:
|
2016-04-15 19:42:57 -04:00
|
|
|
$(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:
|
2016-04-18 14:07:11 -04:00
|
|
|
$(NODE) ./dev-server/index.js
|
2015-09-09 16:24:50 -04:00
|
|
|
|
|
|
|
# ------------------------------------
|
|
|
|
|
2015-09-02 15:08:58 -04:00
|
|
|
test:
|
|
|
|
@make lint
|
2015-11-09 15:22:49 -05:00
|
|
|
@make build
|
2015-11-09 11:40:36 -05:00
|
|
|
@echo ""
|
2016-01-08 13:50:58 -05:00
|
|
|
@make unit
|
|
|
|
@echo ""
|
|
|
|
@make functional
|
|
|
|
@echo ""
|
2016-03-22 16:26:16 -04:00
|
|
|
@make localization
|
|
|
|
@echo ""
|
2015-09-02 15:08:58 -04:00
|
|
|
|
|
|
|
lint:
|
2016-05-11 19:55:20 -04:00
|
|
|
$(ESLINT) . --ext .js,.jsx,.json
|
2015-09-21 13:27:21 -04:00
|
|
|
$(SASSLINT) ./src/*.scss
|
2016-05-11 19:55:20 -04:00
|
|
|
$(SASSLINT) ./src/**/*.scss
|
2015-09-02 15:08:58 -04:00
|
|
|
|
2015-11-09 11:40:36 -05:00
|
|
|
unit:
|
|
|
|
$(TAP) ./test/unit/*.js
|
|
|
|
|
|
|
|
functional:
|
|
|
|
$(TAP) ./test/functional/*.js
|
|
|
|
|
|
|
|
integration:
|
|
|
|
$(TAP) ./test/integration/*.js
|
|
|
|
|
2016-03-22 16:26:16 -04:00
|
|
|
localization:
|
|
|
|
$(TAP) ./test/localization/*.js
|
|
|
|
|
2015-09-02 15:08:58 -04:00
|
|
|
# ------------------------------------
|
|
|
|
|
2016-04-28 15:40:50 -04:00
|
|
|
.PHONY: build clean deploy translations webpack stop start test lint unit functional integration localization
|