From d191b9f161a1179d9fd6ccdf5c69d9be5ba83cf3 Mon Sep 17 00:00:00 2001 From: maieulchevalier Date: Thu, 2 Nov 2023 16:45:38 +0100 Subject: [PATCH 1/2] refactor(package.json & contributing.md): add pnpm link.dist script --- CONTRIBUTING.md | 27 ++++++++++++++++++++++++++- package.json | 13 +++++++------ 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5f6f1a512..9d894de7c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ Discussing the design up front helps to ensure that we're ready to accept your w
-### ▶ 3. Fork the this repo and create a branch. +### ▶ 3. Fork this repo and create a branch. - Hit that "Fork" button above (in this repo's github page). @@ -165,3 +165,28 @@ After your pull request is merged, you can safely delete your branch and pull th ### ▶ 11. That's it! Thank you for your contribution! 🙏💓 [commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit# + +
+ +## Running in your own app + +Sometimes you may not face an issue after running the build process, but your consumer app might. + +When that is the case, you can use `pnpm link` to link your own app to your forked version of qwik-ui. + +### ▶ 1. Link your fork + +Inside the root of your `qwik-ui` branch run: + +``` +pnpm link.dist +``` + +### ▶ 2. Link your app + +Inside the root of your project run: + +``` +pnpm install +pnpm link --global @qwik-ui/headless +``` diff --git a/package.json b/package.json index bda8ce4e6..7fbbc90ea 100644 --- a/package.json +++ b/package.json @@ -8,17 +8,18 @@ "private": false, "type": "module", "scripts": { + "build:headless": "nx build headless", "commit": "git-cz", "format:fix": "pretty-quick --staged", - "prepare": "husky install", - "build:headless": "nx build headless", + "link.dist": "cd packages/kit-headless/dist && pnpm link --global", "lint": "nx affected:lint", - "test:headless": "nx component-test headless", - "test:headless:ci": "nx component-test-ci headless", + "local:npm": "nx local-registry", + "prepare": "husky install", "story:build:headless": "nx build-storybook headless", "story:headless": "nx storybook headless", - "website": "nx serve website", - "local:npm": "nx local-registry" + "test:headless": "nx component-test headless", + "test:headless:ci": "nx component-test-ci headless", + "website": "nx serve website" }, "packageManager": "pnpm@8.7.0", "devDependencies": { From 0b8e9dcb0084bd79ef773c89990a8edcb84e58a5 Mon Sep 17 00:00:00 2001 From: maieulchevalier Date: Fri, 3 Nov 2023 10:41:45 +0100 Subject: [PATCH 2/2] docs(contributing.md): improve pnpm link explanation --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9d894de7c..ada5864e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -170,7 +170,7 @@ After your pull request is merged, you can safely delete your branch and pull th ## Running in your own app -Sometimes you may not face an issue after running the build process, but your consumer app might. +Sometimes you may not face an issue after running the build process, but your consumer app still might. When that is the case, you can use `pnpm link` to link your own app to your forked version of qwik-ui.