-
Notifications
You must be signed in to change notification settings - Fork 643
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (32 loc) · 915 Bytes
/
Makefile
File metadata and controls
46 lines (32 loc) · 915 Bytes
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
MOD = dagre
NPM = npm
DIST_DIR = dist
SRC_FILES = index.js lib/version.js $(shell find lib -type f -name '*.js')
TEST_FILES = $(shell find test -type f -name '*.js' | grep -v 'bundle-test.js')
BUILD_FILES = $(addprefix $(DIST_DIR)/, $(MOD).cjs.js $(MOD).esm.js $(MOD).min.js $(MOD).js)
.PHONY: all bench clean test dist lint build release node_modules
all: build test
bench: test
@src/bench.js
lib/version.js: package.json
@src/release/make-version.js > $@
lint:
@echo "Running lint check via npm (ESLint)..."
@$(NPM) run lint
build:
@echo "Running project build via npm (esbuild)..."
@$(NPM) run build
test: lint
@$(NPM) run test
dist: build test
@echo "Dist files are built in 'dist/' by the 'build' target."
release: dist
@echo
@echo Starting release...
@echo
@src/release/release.sh $(MOD) dist
clean:
rm -rf build dist coverage
node_modules: package.json
@$(NPM) install
@touch $@