mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
fix: _build script
This commit is contained in:
parent
24227df8cb
commit
c523ded8e9
28
_build.js
28
_build.js
@ -1,9 +1,25 @@
|
|||||||
const { execSync } = require("child_process");
|
const { execSync } = require("child_process");
|
||||||
|
|
||||||
try {
|
const commands = [
|
||||||
execSync('tsc');
|
'tsc',
|
||||||
console.log('[Seyfert]: Builded');
|
'bunx tsc',
|
||||||
} catch (e) {
|
'npx tsc',
|
||||||
console.error(e);
|
'pnpx tsc'
|
||||||
console.log('[Seyfert]: Builded with errors');
|
]
|
||||||
|
|
||||||
|
function executeCommands() {
|
||||||
|
for (const cmd of commands) {
|
||||||
|
try {
|
||||||
|
console.log('[Seyfert]:', 'trying to build with `', cmd, '`')
|
||||||
|
execSync(cmd)
|
||||||
|
} catch (e) {
|
||||||
|
if (cmd === commands.at(-1)) {
|
||||||
|
return console.log('[Seyfert]:', e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('[Seyfert]:', 'builded')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
executeCommands()
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
"module": "./lib/index.js",
|
"module": "./lib/index.js",
|
||||||
"types": "./lib/index.d.ts",
|
"types": "./lib/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"lib/**"
|
"lib/**",
|
||||||
|
"./_build.js"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --outDir ./lib",
|
"build": "tsc --outDir ./lib",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user