1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-28 14:10:04 +02:00

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

View File

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