You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,18 +127,21 @@ First [install the GitHub Application](https://github.com/apps/pkg-pr-new).
127
127
> [!IMPORTANT]
128
128
> Make sure it's installed on the repository before trying to publish a package. To read about the permissions the app needs, check [#305](https://github.com/stackblitz-labs/pkg.pr.new/issues/305).
129
129
130
-
After installing on your repository, you can run `npx pkg-pr-new publish` in your workflows and then you have continuous releases!
130
+
After installing on your repository, run `pkg-pr-new` from your lockfile in workflows (for example with `pnpm exec pkg-pr-new publish`) to get continuous releases.
131
131
132
132
```sh
133
-
npm install --save-dev pkg-pr-new# or `npx pkg-pr-new publish`
133
+
npm install --save-dev pkg-pr-new
134
134
```
135
135
136
136
For workspaces and monorepos:
137
137
138
138
```sh
139
-
npx pkg-pr-new publish './packages/A''./packages/B'# or `npx pkg-pr-new publish './packages/*'`
139
+
pnpm execpkg-pr-new publish './packages/A''./packages/B'# or `pnpm exec pkg-pr-new publish './packages/*'`
140
140
```
141
141
142
+
> [!CAUTION]
143
+
> In CI environments, avoid `npx`, `pnpm dlx`, `yarn dlx`, and `bunx` for this step. Install `pkg-pr-new` as a dependency and execute it from the lockfile (`npm exec`, `pnpm exec`, `yarn`, or `bun run`).
144
+
142
145
> [!IMPORTANT]
143
146
> Make sure the pkg-pr-new command runs only once in a defined workflow (that's part of how it avoids spam)! So instead of multiple times running pkg-pr-new for each workspace package, the command should be run one time for all the desired packages using the pattern above.
144
147
@@ -148,15 +151,15 @@ For templates (experimental):
148
151
> With templates, pkg.pr.new will generate Stackblitz instances for the given directories with the new built packages.
By default, pkg.pr.new will generate a template called "default" which includes each built package in the dependencies. This can be disabled with `--no-template`.
155
158
156
159
Compact URLs are the default (and will fall back to long form if npm metadata is unavailable). To force long-form URLs, use `--no-compact`:
> Compact URLs rely on your package being published on npm with a valid `repository` field in `package.json`. See [this](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository). pkg.pr.new is case sensitive, if the GitHub owner is `PuruVJ`, the package.json `repository` field should not have `puruvj`.
@@ -176,7 +179,7 @@ npm i https://pkg.pr.new/tinylibs/tinybench/tinybench@a832a55
176
179
For CLI applications you might want to show `npx` instead of `npm i` for the preview command. This can be accomplished with the `--bin` flag:
177
180
178
181
```sh
179
-
npx pkg-pr-new publish --bin
182
+
pnpm exec pkg-pr-new publish --bin
180
183
```
181
184
182
185
With `--bin`:
@@ -194,7 +197,7 @@ npm i https://pkg.pr.new/pkg-pr-new@a832a55
194
197
You can control publishing comments with `--comment`:
0 commit comments