-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathMakefile
More file actions
111 lines (80 loc) · 2.48 KB
/
Makefile
File metadata and controls
111 lines (80 loc) · 2.48 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
NPX := npx
NODE := node
NPM := npm
LERNA := npx lerna
DOCKER := docker
# Some make settings
SHELL := bash
.ONESHELL:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
CONCURRENCY = 8
default: all
package.json:
node_modules: package-lock.json
all:: node_modules package-lock.json
$(LERNA) --concurrency $(CONCURRENCY) exec --stream -- $(MAKE)
test:
$(LERNA) exec --stream -- $(MAKE) test
test-headless:
$(LERNA) exec --stream -- $(MAKE) test-headless
# Instrumentalization via CLI: $(LERNA) exec --stream -- $(NPX) instrument dist --in-place
# We have done it with a Esbuild-Plugin in the karma.conf.js-file
# To manually merge coverage files: $(NPX) nyc merge coverage ../../coverage-temp/coverage-final.json
test-coverage:
$(LERNA) exec --stream -- $(MAKE) test-coverage
$(NPX) nyc report --reporter=html --reporter=text --reporter=cobertura --report-dir=coverage --temp-dir=coverage-temp --exclude="**/browser.min.js" --exclude="**/spec/*" > COVERAGE.md
test-headless-jquery:
$(LERNA) exec --stream -- $(MAKE) test-headless-jquery
test-headless-ff:
$(LERNA) exec --stream -- $(MAKE) test-headless-ff
ci:
$(LERNA) exec --stream --concurrency=1 -- $(MAKE) test-ci
format:
$(NPX) prettier . --check
format-fix:
$(NPX) prettier . --write
tsc:
$(NPX) tsc
eslint:
$(NPX) eslint .
eslint-fix:
$(NPX) eslint . --fix
dts:
$(NPX) tsc --build tsconfig.dts.json
docker-build:
$(DOCKER) build . --tag tko
# Run the `repackage` target in every directory. Essentially
# homogenizes the `package.json`.
repackage: tools/repackage.mjs
$(LERNA) exec --stream -- $(MAKE) repackage
# Run to update the versions of all the package.json files, before publishing.
bump:
$(LERNA) version
# from-git "identify packages tagged by lerna version and publish them to npm."
# from-package "packages where the latest version is not present in the registry"
publish-unpublished: all link
$(LERNA) publish from-package
package-lock.json: package.json packages/*/package.json
$(NPM) i
package.json:
install: node_modules
outdated-list:
$(NPM) outdated
outdated-upgrade:
$(NPM) upgrade-interactive --latest
install: package-lock.json
sweep:
rm -rf packages/*/dist/*
rm -rf builds/*/dist/*
rm -rf coverage/
rm -rf coverage-temp/
clean: sweep
rm -rf node_modules/
rm -f package-lock.json
rm -rf packages/*/package-lock.json
rm -rf builds/*/package-lock.json
# Local linking of these packages, so they
# are available for local testing/dev.
link:
$(LERNA) exec --stream -- npm link