frontend compile depends on ui

This commit is contained in:
Sérgio Ramos 2016-12-06 10:12:25 +00:00
parent 3802784099
commit 08ad220143
2 changed files with 9 additions and 5 deletions

View File

@ -3,6 +3,7 @@ NAME := $(lastword $(subst /, ,$(CURDIR)))
bindir := $(shell yarn bin)
AVA := $(bindir)/ava
NYC := $(bindir)/nyc
UI := $(shell pwd)/../ui
.PHONY: install
install:
@ -16,21 +17,24 @@ install-production: compile clean
clean:
@rm -rf node_modules
ui:
$(MAKE) compile -C $(UI)
.PHONY: test
test:
test: ui
BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(shell pwd)/webpack/index.js $(NYC) $(AVA) test/*.js $(TEST_ARGS)
XUNIT_DIR := ${CIRCLE_TEST_REPORTS}/tap-xunit
XUNIT := $(bindir)/tap-xunit
XUNIT_OUTPUT := >> ${CIRCLE_TEST_REPORTS}/tap-xunit/xunit-$(NAME)
.PHONY: test-ci
test-ci:
test-ci: ui
mkdir -p $(XUNIT_DIR)
BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(shell pwd)/webpack/index.js $(NYC) $(AVA) test/*.js -t | $(XUNIT) $(XUNIT_OUTPUT).xml
.PHONY: compile
compile: install
NODE_ENV=production ./node_modules/.bin/webpack --config webpack/index.js
compile: ui install
NODE_ENV=production $(bindir)/webpack --config webpack/index.js
.PHONY: build
build:

View File

@ -36,7 +36,7 @@ install-production: compile clean
.PHONY: compile
compile: install
./node_modules/.bin/webpack --config webpack/index.js
$(bindir)/webpack --config webpack/index.js
.PHONY: build
build: