-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (41 loc) · 1.63 KB
/
Copy pathMakefile
File metadata and controls
56 lines (41 loc) · 1.63 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
.PHONY: default build clean docs git-hook pretty lint test run
default: build
build: injectable userscript lib entrypoints
clean:
rm --force --recursive devcontainer/overlay lib node_modules output overlay tsconfig.tsbuildinfo
docs:
@echo "This project has no documentation."
git-hook:
echo "make pretty" > .git/hooks/pre-commit; chmod +x .git/hooks/pre-commit
pretty: node_modules/.package-lock.json
npm exec -- biome check --write --no-errors-on-unmatched
npm pkg fix
lint: node_modules/.package-lock.json
npm exec -- biome check .
npm exec -- tsc --noEmit
test:
@echo "Kitten Analysts test in production."
run: entrypoints
@node output/entrypoint-backend.js
package-lock.json: package.json
npm install --package-lock-only
node_modules/.package-lock.json: package-lock.json
npm ci
lib: node_modules/.package-lock.json
npm exec -- tsc --build
output/*: node_modules/.package-lock.json
npm exec -- vite --config vite.config.user.js build
.PHONY: entrypoints
entrypoints: node_modules/.package-lock.json
node build.js
.PHONY: injectable
injectable: node_modules/.package-lock.json
npm exec -- vite --config vite.config.inject.js build
MINIFY=true npm exec -- vite --config vite.config.inject.js build
mkdir -p devcontainer/overlay/ && cp output/kitten-analysts.inject.js* devcontainer/overlay/
cp -r node_modules/@kitten-science/kitten-scientists/output/* devcontainer/overlay/
rm devcontainer/overlay/*.min.inject.js* devcontainer/overlay/*.user.js*
.PHONY: userscript
userscript: node_modules/.package-lock.json
npm exec -- vite --config vite.config.user.js build
MINIFY=true npm exec -- vite --config vite.config.user.js build