scratch-www/Makefile

81 lines
1.3 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
2016-04-29 14:33:04 -04:00
S3CMD=s3cmd
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
@make translations
2015-09-02 15:08:58 -04:00
@make webpack
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
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:
2016-04-29 14:33:04 -04:00
$(S3CMD) sync -P --delete-removed --exclude '.DS_Store' ./build/ s3://$(S3_BUCKET_NAME)/
2016-04-19 16:35:51 -04:00
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:
$(ESLINT) . --ext .js,.jsx,.json
2015-09-21 13:27:21 -04:00
$(SASSLINT) ./src/*.scss
$(SASSLINT) ./src/**/*.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
# ------------------------------------
2016-04-28 15:40:50 -04:00
.PHONY: build clean deploy translations webpack stop start test lint unit functional integration localization