Skip to content

Commit 355a5fb

Browse files
Merge pull request #474 from maiieul/pnpm-link
refactor(package.json & contributing.md): add pnpm link.dist script
2 parents 29128f4 + 0b8e9dc commit 355a5fb

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

CONTRIBUTING.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Discussing the design up front helps to ensure that we're ready to accept your w
3434

3535
<br/>
3636

37-
### ▶ 3. Fork the this repo and create a branch.
37+
### ▶ 3. Fork this repo and create a branch.
3838

3939
- Hit that "Fork" button above (in this repo's github page).
4040

@@ -165,3 +165,28 @@ After your pull request is merged, you can safely delete your branch and pull th
165165
### ▶ 11. That's it! Thank you for your contribution! 🙏💓
166166

167167
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
168+
169+
<br/>
170+
171+
## Running in your own app
172+
173+
Sometimes you may not face an issue after running the build process, but your consumer app still might.
174+
175+
When that is the case, you can use `pnpm link` to link your own app to your forked version of qwik-ui.
176+
177+
### ▶ 1. Link your fork
178+
179+
Inside the root of your `qwik-ui` branch run:
180+
181+
```
182+
pnpm link.dist
183+
```
184+
185+
### ▶ 2. Link your app
186+
187+
Inside the root of your project run:
188+
189+
```
190+
pnpm install
191+
pnpm link --global @qwik-ui/headless
192+
```

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@
88
"private": false,
99
"type": "module",
1010
"scripts": {
11+
"build:headless": "nx build headless",
1112
"commit": "git-cz",
1213
"format:fix": "pretty-quick --staged",
13-
"prepare": "husky install",
14-
"build:headless": "nx build headless",
14+
"link.dist": "cd packages/kit-headless/dist && pnpm link --global",
1515
"lint": "nx affected:lint",
16-
"test:headless": "nx component-test headless",
17-
"test:headless:ci": "nx component-test-ci headless",
16+
"local:npm": "nx local-registry",
17+
"prepare": "husky install",
1818
"story:build:headless": "nx build-storybook headless",
1919
"story:headless": "nx storybook headless",
20-
"website": "nx serve website",
21-
"local:npm": "nx local-registry"
20+
"test:headless": "nx component-test headless",
21+
"test:headless:ci": "nx component-test-ci headless",
22+
"website": "nx serve website"
2223
},
2324
"packageManager": "[email protected]",
2425
"devDependencies": {

0 commit comments

Comments
 (0)