forked from Opentrons/opentrons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (42 loc) · 1.09 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# opentrons app makefile
# using bash instead of /bin/bash in SHELL prevents macOS optimizing away our PATH update
SHELL := bash
# add node_modules/.bin to PATH
PATH := $(shell cd .. && yarn bin):$(PATH)
# dev server port
PORT ?= 8090
# dependency directories for dev
shell_dir := ../app-shell
discovery_client_dir = ../discovery-client
# standard targets
#####################################################################
.PHONY: all
all: clean dist
.PHONY: setup
setup:
yarn
.PHONY: clean
clean:
shx rm -rf dist
# artifacts
#####################################################################
.PHONY: dist
dist: export NODE_ENV := production
dist:
webpack --profile
# development
#####################################################################
.PHONY: dev
dev: export NODE_ENV := development
dev: export PORT := $(PORT)
dev:
concurrently --no-color --kill-others --names "server,shell" \
"$(MAKE) dev-server" \
"$(MAKE) dev-shell"
.PHONY: dev-server
dev-server:
webpack-dev-server --hot
.PHONY: dev-shell
dev-shell:
wait-on http-get://localhost:$(PORT)
$(MAKE) -C $(shell_dir) dev