Skip to content

Commit c9fec22

Browse files
committed
ci: fix nx build
1 parent 062be2f commit c9fec22

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

Diff for: .github/actions/setup/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ runs:
2828
- uses: nrwl/nx-set-shas@v4
2929

3030
- name: Build packages
31-
run: pnpm build
31+
run: pnpm build:nx
3232
shell: bash

Diff for: CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
After cloning Milkdown, run `pnpm install` to install dependencies.
77

8-
1. Run `pnpm build`.
8+
1. Run `pnpm build:nx`.
99
2. Run `pnpm start` in one terminal to see storybook.
1010

1111
# Commands
@@ -18,7 +18,7 @@ You can run several commands:
1818
- `pnpm test:e2e:debug` runs e2e test with UI.
1919
- `pnpm test:lint` checks the code style.
2020
- `pnpm test:tsc` runs typescript type checks.
21-
- `pnpm build` runs build for all packages with cache powered by nx.
21+
- `pnpm build:nx` runs build for all packages with cache powered by nx.
2222
- `pnpm commit` runs commit with git hooks.
2323

2424
# Pre Check

Diff for: package.json

+19-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"format": "lint-staged",
1919
"fix": "prettier . --write",
2020
"start": "pnpm --filter=@milkdown/storybook run start",
21-
"build": "nx run-many --target=build --all --parallel",
21+
"build:nx": "nx run-many --target=build --all --parallel",
2222
"build:affected": "nx affected --target=build",
2323
"build:packs": "pnpm --filter=@milkdown/* run build",
2424
"ci:version": "changeset version && pnpm install --no-frozen-lockfile",
@@ -129,5 +129,23 @@
129129
"safe-buffer": "npm:@nolyfill/safe-buffer@^1",
130130
"safer-buffer": "npm:@nolyfill/safer-buffer@^1"
131131
}
132+
},
133+
"nx": {
134+
"targets": {
135+
"build": {
136+
"outputs": [
137+
"{projectRoot}/lib"
138+
],
139+
"dependsOn": [
140+
"build"
141+
]
142+
},
143+
"tsc": {
144+
"outputs": [],
145+
"dependsOn": [
146+
"build"
147+
]
148+
}
149+
}
132150
}
133151
}

0 commit comments

Comments
 (0)