2018-09-11 20:55:36 +00:00
|
|
|
YARN := $(shell command -v yarn 2> /dev/null)
|
|
|
|
UISOURCES := $(shell find . -type f -not \( -path ./build/\* -o -path ./node_modules/\* -o -path ./.cache/\* -o -name Makefile -prune \) )
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
node_modules: yarn.lock
|
|
|
|
ifndef YARN
|
|
|
|
$(error Please install yarn 0.19.1+)
|
|
|
|
else
|
2018-10-08 17:29:45 +00:00
|
|
|
yarn --no-progress --emoji false
|
2018-09-11 20:55:36 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
build: node_modules $(UISOURCES)
|
|
|
|
ifndef YARN
|
|
|
|
$(error Please install yarn 0.19.1+)
|
|
|
|
else
|
|
|
|
yarn run build
|
|
|
|
endif
|
|
|
|
|
2018-09-27 17:46:48 +00:00
|
|
|
lint: node_modules $(UISOURCES)
|
|
|
|
ifndef YARN
|
|
|
|
$(error Please install yarn 0.19.1+)
|
|
|
|
else
|
2018-11-07 17:06:02 +00:00
|
|
|
yarn run lint
|
2018-09-27 17:46:48 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2018-09-11 20:55:36 +00:00
|
|
|
test:
|
|
|
|
ifndef YARN
|
|
|
|
$(error Please install yarn 0.19.1+)
|
|
|
|
else
|
|
|
|
yarn test --runInBand
|
|
|
|
endif
|
|
|
|
|
|
|
|
clean:
|
|
|
|
ifndef YARN
|
|
|
|
$(error Please install yarn 0.19.1+)
|
|
|
|
else
|
|
|
|
yarn run clean
|
|
|
|
endif
|
|
|
|
|
2018-09-25 22:40:46 +00:00
|
|
|
run:
|
|
|
|
yarn run start
|
2018-09-11 20:55:36 +00:00
|
|
|
|
2018-09-27 17:46:48 +00:00
|
|
|
.PHONY: all clean test run lint
|