build: 按依赖顺序构建
This commit is contained in:
31
scripts/build.mjs
Normal file
31
scripts/build.mjs
Normal file
@@ -0,0 +1,31 @@
|
||||
import execa from 'execa';
|
||||
import minimist from 'minimist';
|
||||
|
||||
const { type } = minimist(process.argv.slice(2));
|
||||
|
||||
const run = (bin, args, opts = {}) => execa(bin, args, { stdio: 'inherit', ...opts });
|
||||
|
||||
const main = async () => {
|
||||
// 按照依赖顺序构建
|
||||
const packages = [
|
||||
'schema',
|
||||
'utils',
|
||||
'dep',
|
||||
'data-source',
|
||||
'core',
|
||||
'design',
|
||||
'element-plus-adapter',
|
||||
'tdesign-vue-next-adapter',
|
||||
'form',
|
||||
'table',
|
||||
'stage',
|
||||
'editor',
|
||||
'cli',
|
||||
];
|
||||
|
||||
for (const pkg of packages) {
|
||||
await run('pnpm', ['--filter', `@tmagic/${pkg}`, type ? 'build:type' : 'build']);
|
||||
}
|
||||
};
|
||||
|
||||
main();
|
||||
Reference in New Issue
Block a user