diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ecb91c9..11d1d99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,3 +27,8 @@ jobs: - name: 🩺 Run build run: pnpm build + + - name: 🩺 Run build:demo + run: | + pnpm build:demo + pnpm build:node-demo diff --git a/.gitignore b/.gitignore index 85007f4..f1af3cc 100644 --- a/.gitignore +++ b/.gitignore @@ -136,3 +136,7 @@ dist packages/**/src/locales packages/**/lib + + +# tsx +**/tsx-0 \ No newline at end of file diff --git a/examples-node/esbuild.config.mjs b/examples-node/esbuild.config.mjs index c670ce2..051b510 100644 --- a/examples-node/esbuild.config.mjs +++ b/examples-node/esbuild.config.mjs @@ -11,7 +11,7 @@ const define = { if (!args.watch) { const gitCommitHash = execSync('git rev-parse --short HEAD').toString().trim(); - const gitRefName = execSync('git symbolic-ref -q --short HEAD || git describe --tags --exact-match').toString().trim(); + const gitRefName = execSync('git symbolic-ref -q --short HEAD || git describe --tags --exact-match || echo "unknown"').toString().trim(); define['process.env.GIT_COMMIT_HASH'] = `"${gitCommitHash}"`; define['process.env.GIT_REF_NAME'] = `"${gitRefName}"`; diff --git a/examples/esbuild.config.mjs b/examples/esbuild.config.mjs index fe33cc4..b028a57 100644 --- a/examples/esbuild.config.mjs +++ b/examples/esbuild.config.mjs @@ -46,7 +46,7 @@ const define = { if (!args.watch) { const gitCommitHash = execSync('git rev-parse --short HEAD').toString().trim(); - const gitRefName = execSync('git symbolic-ref -q --short HEAD || git describe --tags --exact-match').toString().trim(); + const gitRefName = execSync('git symbolic-ref -q --short HEAD || git describe --tags --exact-match || echo "unknown"').toString().trim(); define['process.env.GIT_COMMIT_HASH'] = `"${gitCommitHash}"`; define['process.env.GIT_REF_NAME'] = `"${gitRefName}"`; diff --git a/package.json b/package.json index ac8aa03..ab31794 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "prepare": "simple-git-hooks", "dev": "pnpm --filter examples dev:demo", - "build": "turbo build --concurrency=2", + "build": "turbo build:preset --concurrency=2 && pnpm --filter @univerjs/presets build", "build:demo": "pnpm --filter examples build:demo", "build:node-demo": "pnpm --filter examples-node build:demo", "lint": "eslint .", diff --git a/packages/preset-docs-collaboration/package.json b/packages/preset-docs-collaboration/package.json index 440ed23..6ca888a 100644 --- a/packages/preset-docs-collaboration/package.json +++ b/packages/preset-docs-collaboration/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-docs-core/package.json b/packages/preset-docs-core/package.json index 97a5714..3b3ef40 100644 --- a/packages/preset-docs-core/package.json +++ b/packages/preset-docs-core/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-docs-drawing/package.json b/packages/preset-docs-drawing/package.json index c105bf5..eb0f511 100644 --- a/packages/preset-docs-drawing/package.json +++ b/packages/preset-docs-drawing/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-docs-hyper-link/package.json b/packages/preset-docs-hyper-link/package.json index 0c0f9d1..d3bb019 100644 --- a/packages/preset-docs-hyper-link/package.json +++ b/packages/preset-docs-hyper-link/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-docs-thread-comment/package.json b/packages/preset-docs-thread-comment/package.json index a748690..2e50807 100644 --- a/packages/preset-docs-thread-comment/package.json +++ b/packages/preset-docs-thread-comment/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-advanced/package.json b/packages/preset-sheets-advanced/package.json index cf563d5..40f0a3b 100644 --- a/packages/preset-sheets-advanced/package.json +++ b/packages/preset-sheets-advanced/package.json @@ -63,7 +63,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-collaboration/package.json b/packages/preset-sheets-collaboration/package.json index 6d093c8..16ecc9c 100644 --- a/packages/preset-sheets-collaboration/package.json +++ b/packages/preset-sheets-collaboration/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-conditional-formatting/package.json b/packages/preset-sheets-conditional-formatting/package.json index d63a740..c1500b8 100644 --- a/packages/preset-sheets-conditional-formatting/package.json +++ b/packages/preset-sheets-conditional-formatting/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-core/package.json b/packages/preset-sheets-core/package.json index e1ad39b..95c3224 100644 --- a/packages/preset-sheets-core/package.json +++ b/packages/preset-sheets-core/package.json @@ -63,7 +63,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-data-validation/package.json b/packages/preset-sheets-data-validation/package.json index db56dff..d511a15 100644 --- a/packages/preset-sheets-data-validation/package.json +++ b/packages/preset-sheets-data-validation/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-drawing/package.json b/packages/preset-sheets-drawing/package.json index 9cb9a9b..c07948e 100644 --- a/packages/preset-sheets-drawing/package.json +++ b/packages/preset-sheets-drawing/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-filter/package.json b/packages/preset-sheets-filter/package.json index 6f5ca1c..df2687a 100644 --- a/packages/preset-sheets-filter/package.json +++ b/packages/preset-sheets-filter/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-find-replace/package.json b/packages/preset-sheets-find-replace/package.json index 681b259..8d592f1 100644 --- a/packages/preset-sheets-find-replace/package.json +++ b/packages/preset-sheets-find-replace/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-hyper-link/package.json b/packages/preset-sheets-hyper-link/package.json index 56d9f2b..481b47b 100644 --- a/packages/preset-sheets-hyper-link/package.json +++ b/packages/preset-sheets-hyper-link/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-node-core/package.json b/packages/preset-sheets-node-core/package.json index 52856a5..0548ec8 100644 --- a/packages/preset-sheets-node-core/package.json +++ b/packages/preset-sheets-node-core/package.json @@ -58,7 +58,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-sort/package.json b/packages/preset-sheets-sort/package.json index f85acd5..a44190a 100644 --- a/packages/preset-sheets-sort/package.json +++ b/packages/preset-sheets-sort/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/preset-sheets-thread-comment/package.json b/packages/preset-sheets-thread-comment/package.json index 1b06d7c..71d807e 100644 --- a/packages/preset-sheets-thread-comment/package.json +++ b/packages/preset-sheets-thread-comment/package.json @@ -57,7 +57,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build:preset": "tsx build.ts" }, "peerDependencies": { diff --git a/packages/presets/package.json b/packages/presets/package.json index cb522c4..855acb0 100644 --- a/packages/presets/package.json +++ b/packages/presets/package.json @@ -255,7 +255,7 @@ "lib" ], "scripts": { - "prebuild": "tsx prepare.ts", + "prepare": "tsx prepare.ts", "build": "tsx build.ts" }, "peerDependencies": { diff --git a/turbo.json b/turbo.json index 7bc7b84..6453775 100644 --- a/turbo.json +++ b/turbo.json @@ -4,20 +4,8 @@ "//" ], "tasks": { - "prebuild": { - "cache": false - }, "build:preset": { - "cache": false, - "dependsOn": [ - "prebuild" - ] - }, - "build": { - "cache": false, - "dependsOn": [ - "build:preset" - ] + "cache": false } } }