-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
40 lines (30 loc) · 976 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
test:
@env TZ=Asia/Kolkata pnpm exec vitest run
test-watch:
@env TZ=Asia/Kolkata pnpm exec vitest
types:
@pnpm exec tsc --noEmit
types-watch:
@pnpm exec tsc --noEmit --watch
test-types: build
@pnpm exec attw --pack lib
build: prepare-build
@pnpm exec tsc -p tsconfig.lib.json
@env BABEL_ENV=esm pnpm exec babel src --config-file ./babel.config.json --source-root src --out-dir lib --extensions .js,.ts --out-file-extension .js --quiet
@env BABEL_ENV=cjs pnpm exec babel src --config-file ./babel.config.json --source-root src --out-dir lib --extensions .js,.ts --out-file-extension .cjs --quiet
@node copy.mjs
@make build-cts
build-cts:
@find lib -name '*.d.ts' | while read file; do \
new_file=$${file%.d.ts}.d.cts; \
cp $$file $$new_file; \
done
prepare-build:
@rm -rf lib
@mkdir -p lib
publish: build
@cd lib && pnpm publish --access public
publish-next: build
@cd lib && pnpm publish --access public --tag next
link:
@cd lib && pnpm link