This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (63 loc) · 1.67 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
60
61
62
63
64
65
66
67
68
69
70
71
#
# Project
#
package-lock.json: package.json
npm install
touch $@
node_modules: package-lock.json
npm install
touch $@
build: node_modules
use-npm-entity-architect:
npm uninstall @whi/entity-architect
npm i --save @whi/entity-architect
use-npm-essence:
npm uninstall @whi/essence
npm i --save @whi/essence
use-npm-holochain-client:
npm uninstall @whi/holochain-client
npm i --save @whi/holochain-client
use-npm-repr:
npm uninstall @whi/repr
npm i --save @whi/repr
#
# Testing
#
test: test-unit test-e2e
test-debug: test-unit-debug test-e2e-debug
test-unit: build test-setup
LOG_LEVEL=fatal npx mocha ./tests/unit
test-unit-debug: build test-setup
LOG_LEVEL=silly npx mocha ./tests/unit
test-e2e: build test-setup prepare-package
npx mocha ./tests/e2e
test-e2e-debug: build test-setup prepare-package
LOG_LEVEL=silly npx mocha ./tests/e2e
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:
FILENAME=crux-payload-parser.js WEBPACK_MODE=development npm run build
npm run build
gzip -kc dist/crux-payload-parser.js dist/crux-payload-parser.js.map > dist/crux-payload-parser.gz
gzip -kc dist/crux-payload-parser.prod.js dist/crux-payload-parser.prod.js.map > dist/crux-payload-parser.prod.gz
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 .