-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (51 loc) · 1.13 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
57
58
59
#
# Project
#
package-lock.json: package.json
npm install
touch $@
node_modules: package-lock.json
npm install
touch $@
build: node_modules
#
# Testing
#
test: build test-setup
npx mocha --recursive ./tests
test-debug: build test-setup
LOG_LEVEL=trace npx mocha --recursive ./tests
test-unit: build test-setup
npx mocha ./tests/unit
test-unit-debug: build test-setup
LOG_LEVEL=trace npx mocha ./tests/unit
test-integration: build test-setup
npx mocha ./tests/integration
test-integration-debug: build test-setup
LOG_LEVEL=trace npx mocha ./tests/integration
test-setup:
#
# Repository
#
clean-remove-chaff:
@find . -name '*~' -exec rm {} \;
clean-files: clean-remove-chaff
git clean -nd
clean-files-force: clean-remove-chaff
git clean -fd
clean-files-all: clean-remove-chaff
git clean -ndx
clean-files-all-force: clean-remove-chaff
git clean -fdx
#
# NPM
#
prepare-package:
npm run build
gzip -kf dist/*.js
preview-package: clean-files test prepare-package
npm pack --dry-run .
create-package: clean-files test prepare-package
npm pack .
publish-package: clean-files test prepare-package
npm publish --access public .