fix: 打包修改
This commit is contained in:
parent
c832c0274a
commit
f182838a2d
@ -1,2 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
import '../dist/index.js';
|
import { runParser } from '../dist/index.js';
|
||||||
|
|
||||||
|
runParser(process.argv);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"bin"
|
"bin"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsx src/index.ts ",
|
"dev": "tsx src/run.ts ",
|
||||||
"build": "rimraf dist && rollup -c",
|
"build": "rimraf dist && rollup -c",
|
||||||
"b": "./bin/envision.js"
|
"b": "./bin/envision.js"
|
||||||
},
|
},
|
||||||
|
@ -27,5 +27,5 @@ export default {
|
|||||||
declaration: false,
|
declaration: false,
|
||||||
}), // 使用 @rollup/plugin-typescript 处理 TypeScript 文件
|
}), // 使用 @rollup/plugin-typescript 处理 TypeScript 文件
|
||||||
],
|
],
|
||||||
external: ['sqlite3', 'sequelize'], // 将 sqlite3 作为外部依赖
|
external: ['sqlite3', 'sequelize', 'vite'], // 将 sqlite3 作为外部依赖
|
||||||
};
|
};
|
||||||
|
@ -9,4 +9,9 @@ import './command/config.ts';
|
|||||||
import './command/web.ts';
|
import './command/web.ts';
|
||||||
import './command/router.ts';
|
import './command/router.ts';
|
||||||
|
|
||||||
program.parse(process.argv);
|
// program.parse(process.argv);
|
||||||
|
|
||||||
|
export const runParser = async (argv: string[]) => {
|
||||||
|
// program.parse(process.argv);
|
||||||
|
program.parse(argv);
|
||||||
|
};
|
||||||
|
3
src/run.ts
Normal file
3
src/run.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import { runParser } from './index.ts';
|
||||||
|
|
||||||
|
runParser(process.argv);
|
Loading…
x
Reference in New Issue
Block a user