-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
50 lines (38 loc) · 921 Bytes
/
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
.PHONY: all test examples
# The default target that builds the package
all: build lint
# Installs NPM dependencies for the root project and for the test and examples "workspaces"
install:
yarn
# Clear all installed NPM dependencies
uninstall:
find . -name "node_modules" -type d -exec rm -rf '{}' +
# Upgrade NPM dependencies
upgrade:
yarn upgrade --latest
cd test; yarn upgrade --latest
cd examples; yarn upgrade --latest
# Build project
build:
yarn rollup -c
# Build and watch project
watch:
yarn rollup -cw
# Clean built project
clean:
rm -rf dist
# Lint (source & built)
lint:
yarn eslint . --fix --ext .js,.ts
# Run the complete test suite from test project
test:
cd test; yarn
cd test; yarn test
# Check whether the examples still work
examples:
cd examples; yarn
cd examples; yarn test
# Publish built package
publish:
cd dist; npm publish
release: clean build lint test examples publish