Skip to content

Commit

Permalink
chore(build): fix build (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexf00 authored Nov 30, 2024
1 parent 8d5d74d commit 08021a4
Show file tree
Hide file tree
Showing 24 changed files with 31 additions and 34 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ jobs:

- name: 🩺 Run build
run: pnpm build

- name: 🩺 Run build:demo
run: |
pnpm build:demo
pnpm build:node-demo
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,7 @@ dist

packages/**/src/locales
packages/**/lib


# tsx
**/tsx-0
2 changes: 1 addition & 1 deletion examples-node/esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"`;
Expand Down
2 changes: 1 addition & 1 deletion examples/esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-docs-collaboration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-docs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-docs-drawing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-docs-hyper-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-docs-thread-comment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-advanced/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-collaboration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-conditional-formatting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-data-validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-drawing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-filter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-find-replace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-hyper-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-node-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-sort/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-sheets-thread-comment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build:preset": "tsx build.ts"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/presets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
"lib"
],
"scripts": {
"prebuild": "tsx prepare.ts",
"prepare": "tsx prepare.ts",
"build": "tsx build.ts"
},
"peerDependencies": {
Expand Down
14 changes: 1 addition & 13 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,8 @@
"//"
],
"tasks": {
"prebuild": {
"cache": false
},
"build:preset": {
"cache": false,
"dependsOn": [
"prebuild"
]
},
"build": {
"cache": false,
"dependsOn": [
"build:preset"
]
"cache": false
}
}
}

0 comments on commit 08021a4

Please sign in to comment.