-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.shared
31 lines (27 loc) · 1.11 KB
/
makefile.shared
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
# This file is responsible for defining shared developer commands across all packages,
# including the package this is copied from, _ts-app-devkit.
# It gets copied into all TSAPP packages during setup.
# You can run `make packages/copy-shared-files` after updating this file in the _ts-app-devkit package
# to update downstream shared dependencies for TSAPP packages.
superclean:
npx shx rm -f ./package-lock.json
npx shx rm -f ./package.json
npx shx rm -rf node_modules
find ./packages -name "node_modules" -type d -prune -exec rm -rf '{}' +
tests:
for test in ./test/test.*.ts; do \
echo "$$test"; \
node \
--experimental-specifier-resolution=node --experimental-modules --no-warnings \
--loader ts-node/esm $$test; \
done
package:
npx shx rm -rf ./dist
npx shx rm -rf ./@types
npx tsc --project ./config/tsconfig.package.json
npx esbuild ./src/index.ts \
--platform=node --bundle --target=node18 --outfile=./dist/index.js
npx babel ./dist --out-dir ./dist --presets=@babel/preset-typescript,@babel/preset-env
package/cli:
make -f makefile.shared package
npx pkg ./dist/index.js --out-path=./dist/