Skip to content

Commit c2f6cbc

Browse files
chore: use nx local-registry executor (#183)
1 parent 4db7135 commit c2f6cbc

File tree

4 files changed

+18
-39
lines changed

4 files changed

+18
-39
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,13 @@ After your pull request is merged, you can safely delete your branch and pull th
143143
To test if your changes will actually work once the changes are published,
144144
it can be useful to publish to a local registry.
145145

146-
- Run `pnpm run local-registry start` in Terminal 1 (keep it running)
146+
- Run `pnpm exec nx run qwik-nx-repo:local-registry` in Terminal 1 (keep it running)
147147
- Run `npm adduser --registry http://localhost:4873` in Terminal 2 (real credentials are not required, you just need to
148148
be logged in. You can use test/test/[email protected].)
149-
- Run `pnpm run local-registry enable` in Terminal 2
150149
- Run `pnpm exec nx run qwik-nx:publish:local` in Terminal 2. You can set the version you want to publish in the package's package.json file.
151150

152151
If you have problems publishing, make sure you use Node 18 and NPM 8. Alternatively to running the project's "publish" target you can build and publish manually by running `pnpm exec nx build:qwik-nx && cd dist/projects/qwik-nx && npm publish --registry=http://localhost:4873`
153152

154-
**NOTE:** After you finish with local testing don't forget to stop the local registry (e.g. closing the Terminal 1) and disabling the local registry using `pnpm run local-registry disable`. Keeping local registry enabled will change your lock file resolutions to `localhost:4873` on the next `pnpm install`. You can also run `pnpm run local-registry clear` to clean all packages in that local registry.
155-
156153
**NOTE:** To use this newly published local version, you need to make a new workspace or change your target package to this new version, eg: `"qwik-nx": "^1.0.0",` and re-run `pnpm install` in your testing project.
157154

158155
### ▶ 10. That's it! Thank you for your contribution! 🙏💓

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"build": "nx build",
77
"commit": "git-cz",
88
"format:fix": "pretty-quick --staged",
9-
"local-registry": "sh ./scripts/local-registry.sh",
109
"prepare": "husky install",
1110
"start": "nx serve",
1211
"test": "nx test",
@@ -85,5 +84,8 @@
8584
"commitizen": {
8685
"path": "./node_modules/cz-conventional-changelog"
8786
}
87+
},
88+
"nx": {
89+
"includedScripts": []
8890
}
8991
}

project.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "qwik-nx-repo",
3+
"$schema": "node_modules/nx/schemas/project-schema.json",
4+
"targets": {
5+
"local-registry": {
6+
"executor": "@nx/js:verdaccio",
7+
"options": {
8+
"port": 4873,
9+
"config": ".verdaccio/config.yml",
10+
"storage": "tmp/local-registry/storage"
11+
}
12+
}
13+
}
14+
}

scripts/local-registry.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)