mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
build: 按依赖顺序构建
This commit is contained in:
parent
f467c88b10
commit
883e5d60fa
@ -2,4 +2,4 @@
|
|||||||
. "$(dirname "$0")/_/husky.sh"
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
npx lint-staged
|
npx lint-staged
|
||||||
pnpm --filter "@tmagic/*" build:type
|
node ./scripts/build.mjs --type
|
@ -3,7 +3,7 @@
|
|||||||
"name": "tmagic",
|
"name": "tmagic",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@9.0.4",
|
"packageManager": "pnpm@9.0.5",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "pnpm i && pnpm build",
|
"bootstrap": "pnpm i && pnpm build",
|
||||||
"clean:top": "rimraf */**/dist */**/types */dist coverage dwt*",
|
"clean:top": "rimraf */**/dist */**/types */dist coverage dwt*",
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"pg:vue2": "pnpm playground:vue2",
|
"pg:vue2": "pnpm playground:vue2",
|
||||||
"playground:react": "pnpm --filter \"runtime-react\" build:libs && pnpm --filter \"runtime-react\" --filter \"tmagic-playground\" dev:react",
|
"playground:react": "pnpm --filter \"runtime-react\" build:libs && pnpm --filter \"runtime-react\" --filter \"tmagic-playground\" dev:react",
|
||||||
"pg:react": "pnpm playground:react",
|
"pg:react": "pnpm playground:react",
|
||||||
"build": "pnpm --filter \"@tmagic/*\" build",
|
"build": "node scripts/build.mjs",
|
||||||
"build:playground": "pnpm --filter \"runtime-vue3\" build && pnpm --filter \"tmagic-playground\" build",
|
"build:playground": "pnpm --filter \"runtime-vue3\" build && pnpm --filter \"tmagic-playground\" build",
|
||||||
"docs:dev": "vitepress dev docs",
|
"docs:dev": "vitepress dev docs",
|
||||||
"docs:serve": "vitepress serve docs",
|
"docs:serve": "vitepress serve docs",
|
||||||
|
12264
pnpm-lock.yaml
generated
12264
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
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();
|
Loading…
x
Reference in New Issue
Block a user