tool en vez de npm scripts para velocidad
This commit is contained in:
parent
cb66797214
commit
db3ed21876
2 changed files with 23 additions and 3 deletions
|
@ -5,9 +5,9 @@
|
|||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build-ts": "esbuild compilar.ts --target=node18 --outdir=build.js --sourcemap",
|
||||
"build": "pnpm build-ts && node build.js/compilar.js",
|
||||
"check": "tsc --noEmit"
|
||||
"build-ts": "./tool build_ts",
|
||||
"build": "./tool build",
|
||||
"check": "./tool tsc"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
|
20
tool
Executable file
20
tool
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
build_ts() {
|
||||
./node_modules/.bin/esbuild compilar.ts --target=node18 --outdir=build.js --sourcemap
|
||||
}
|
||||
build() {
|
||||
build_ts
|
||||
node build.js/compilar.js
|
||||
}
|
||||
check() {
|
||||
./node_modules/.bin/tsc --noEmit
|
||||
}
|
||||
|
||||
fatal() {
|
||||
echo "$1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
test "$1" = build_ts -o "$1" = build -o "$1" = check || fatal "Comando no válido"
|
||||
"$1"
|
Reference in a new issue