Skip to content

Commit 7f1b5df

Browse files
committed
fix: update build scripts and workflows for improved demo compilation
1 parent b0bc668 commit 7f1b5df

4 files changed

Lines changed: 25 additions & 19 deletions

File tree

.github/workflows/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
3434
# - run: pnpm exec nx-cloud record -- echo Hello World
3535
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
36-
- run: pnpx nx affected -t build && pnpm build
36+
- run: pnpm build:all

demos/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"version": "0.0.1",
55
"type": "module",
66
"scripts": {
7-
"compile:demos": "cd .. && pnpm demos",
87
"dev": "vite",
98
"build": "tsc -b && vite build",
109
"lint": "eslint .",

nx.json

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,31 @@
99
"outputs": [
1010
"{projectRoot}/dist"
1111
],
12-
"cache": true
12+
"cache": true,
13+
"parallelism": false
14+
},
15+
"demos": {
16+
"dependsOn": [
17+
"dist"
18+
],
19+
"parallelism": false,
20+
"cache": true,
21+
"outputs": [
22+
"{projectRoot}demos/public/out",
23+
"{projectRoot}demos/packages.json"
24+
]
1325
},
1426
"build": {
1527
"dependsOn": [
1628
"^build",
1729
"minify",
18-
"lint",
19-
"compile:demos"
20-
]
30+
"lint"
31+
],
32+
"parallelism": true
33+
},
34+
"lint": {
35+
"parallelism": true,
36+
"cache": false
2137
},
2238
"minify": {
2339
"dependsOn": [
@@ -27,18 +43,8 @@
2743
"outputs": [
2844
"{projectRoot}/dist"
2945
],
30-
"cache": true
31-
},
32-
"dev": {
33-
"dependsOn": [
34-
"compile:demos"
35-
]
36-
},
37-
"compile:demos": {
3846
"cache": true,
39-
"outputs": [
40-
"{projectRoot}/public/out"
41-
]
47+
"parallelism": true
4248
}
4349
},
4450
"plugins": [

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@
99
},
1010
"description": "A Comprehensive Integration of All Web Standard APIs",
1111
"scripts": {
12-
"build": "nx run-many --target=build",
12+
"build": "nx run-many --target=build --exclude=@arcstack/webapis --exclude=@arcstack/demos",
1313
"predist": "rm -rf dist",
1414
"dist": "gulp dist",
1515
"predemos": "rm -rf demos/public/out",
1616
"demos": "gulp demos",
17-
"lint": "eslint **/* && tsc",
17+
"build:all": "nx demos @arcstack/webapis && nx build @arcstack/demos",
1818
"clean": "find . -type d -name 'dist' -not -path '*/node_modules/*' -not -path '*/.nx/*'",
1919
"unsafe-clean": "find . -type d -name 'dist' -not -path '*/node_modules/*' -not -path '*/.nx/*' -exec rm -rf {} +",
2020
"uninstall-husky": "pnpm uninstall husky --no-save && git config --unset core.hooksPath && pnpm dlx rimraf .husky"
2121
},
22+
"nx": {},
2223
"husky": {
2324
"hooks": {
2425
"pre-commit": "lint-staged"

0 commit comments

Comments
 (0)