-
Notifications
You must be signed in to change notification settings - Fork 199
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (50 loc) · 1.43 KB
/
Makefile
File metadata and controls
65 lines (50 loc) · 1.43 KB
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
57
58
59
60
61
62
63
64
65
# opentrons protocol designer 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 .. && pnpm bin):$(PATH)
# These variables can be overridden when make is invoked to customize the
# behavior of jest
tests ?=
cov_opts ?= --coverage --pool=threads
test_opts ?=
# standard targets
#####################################################################
.PHONY: all
all: clean dist
.PHONY: setup
setup:
pnpm install
.PHONY: clean
clean:
pnpm exec shx rm -rf dist
# artifacts
#####################################################################
.PHONY: dist
dist: export NODE_ENV := production
dist: export NODE_OPTIONS := --max-old-space-size=5120
dist:
vite build
git rev-parse HEAD > dist/.commit
# development
#####################################################################
.PHONY: dev
dev: export NODE_ENV := development
dev: export NODE_OPTIONS := --max-old-space-size=8192
dev:
vite serve
# production assets server
.PHONY: serve
serve: export NODE_OPTIONS := --max-old-space-size=8192
serve: all
vite preview
.PHONY: test
test:
$(MAKE) -C .. test-js-protocol-designer tests="$(tests)" test_opts="$(test_opts)"
.PHONY: test-cov
test-cov:
make -C .. test-js-protocol-designer tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)"
# analyze bundle
.PHONY: bundle-analyzer
bundle-analyzer:
ANALYZE_DEBUG=true make dist