Skip to content

Commit

Permalink
docs(core): update create-install-package (#27562)
Browse files Browse the repository at this point in the history
Updates the create-install-package recipe to match what is currently
generated

Fixes #22663
  • Loading branch information
isaacplmann authored Aug 21, 2024
1 parent a08e2ad commit da823e0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/shared/recipes/plugins/create-install-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function main() {
// TODO: update below to customize the workspace
const { directory } = await createWorkspace(`my-plugin@${presetVersion}`, {
name,
nxCloud: false,
nxCloud: 'skip',
packageManager: 'npm',
});

Expand All @@ -84,7 +84,7 @@ Note the following code snippet:
```typescript
const { directory } = await createWorkspace(`my-plugin@${presetVersion}`, {
name,
nxCloud: false,
nxCloud: 'skip',
packageManager: 'npm',
});
```
Expand Down Expand Up @@ -125,10 +125,11 @@ npx nx local-registry
Note, after terminating the terminal window where the `nx local-registry` command is running (e.g. using `CTRL+c` or `CMD+c`) the registry will be stopped, previously installed packages will be cleaned up and the npm/yarn/pnpm registries will be restored to their original state, pointing to the real NPM servers again.
{% /callout %}

Next, you can **publish** your packages to your new local registry. All of the generated packages have a `publish` target, so you can simply run:
Next, you can **publish** your packages to your new local registry. All of the generated packages have a `nx-release-publish` target that is configured to publish whatever is in your `build` output folder, so you can simply run:

```shell
npx nx run-many --targets publish --ver 1.0.0 --tag latest
npx nx run-many --targets build
npx nx run-many --targets nx-release-publish
```

Once the packages are published, you should be able to test the behavior of your "create package" as follows:
Expand Down

0 comments on commit da823e0

Please sign in to comment.