1
0
mirror of synced 2026-03-22 10:28:36 +08:00

build: 不在每个package中构建dts,解决package间相互依赖问题

This commit is contained in:
roymondchen
2024-08-08 16:05:10 +08:00
committed by roymondchen
parent de47514f69
commit 7aeca39521
61 changed files with 199 additions and 560 deletions

View File

@@ -1,32 +0,0 @@
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 build = (pkg) => run('pnpm', ['--filter', `@tmagic/${pkg}`, type ? 'build:type' : 'build']);
const main = async () => {
// 按照依赖顺序构建
build('cli');
await Promise.all([
(async () => {
for (const pkg of ['schema', 'utils', 'dep', 'data-source', 'core', 'stage']) {
await build(pkg);
}
})(),
(async () => {
for (const pkg of ['design', 'element-plus-adapter', 'tdesign-vue-next-adapter']) {
await build(pkg);
}
})(),
]);
for (const pkg of ['form', 'table', 'editor', 'vue-runtime-help', 'tmagic-form-runtime', 'ui']) {
await build(pkg);
}
};
main();