Skip to content

Commit d1e863a

Browse files
Documented the new "tag" and "scope" options
1 parent 168c7e8 commit d1e863a

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ You can set any or all of the following input parameters:
7777
|`token` |string |yes | |The NPM auth token to use for publishing
7878
|`registry` |string |no |https://registry.npmjs.org/ |The NPM registry URL to use
7979
|`package` |string |no |./package.json |The path of your package.json file
80-
|`check-version` |boolean |no |true |Only publish to NPM if the version number in `package.json` differs from the latest on NPM
80+
|`tag` |string |no |"latest" |The tag to publish to. This allows people to install the package using `npm install <package-name>@<tag>`.
81+
|`access` |string |no |"public" for non-scoped packages. "restricted" for scoped packages.|Determines whether the published package should be publicly visible, or restricted to members of your NPM organization.
8182
|`dry-run` |boolean |no |false |Run NPM publish with the `--dry-run` flag to prevent publication
83+
|`check-version` |boolean |no |true |Only publish to NPM if the version number in `package.json` differs from the latest on NPM
8284

8385

8486

@@ -104,6 +106,8 @@ steps:
104106
|`type` |string |The type of version change that occurred ("major", "minor", "patch", etc.). If there was no version change, then type will be "none".
105107
|`version` |string |The version that was published
106108
|`old-version` |string |The version number that was previously published to NPM
109+
|`tag` |string |The tag that the package was published to.
110+
|`access` |string |Indicates whether the published package is publicly visible or restricted to members of your NPM organization.
107111
|`dry-run` |boolean |Indicates whether NPM was run in "dry run" mode
108112

109113

@@ -139,8 +143,10 @@ As shown in the example above, you can pass options to the `npmPublish()` functi
139143
|`token` |string |NPM's default credentials |The NPM auth token to use for publishing. If not set, then NPM will
140144
|`registry` |string |https://registry.npmjs.org/ |The NPM registry URL to use
141145
|`package` |string |./package.json |The path of your package.json file
142-
|`checkVersion` |boolean |true |Only publish to NPM if the version number in `package.json` differs from the latest on NPM
146+
|`tag` |string |"latest" |The tag to publish to. This allows people to install the package using `npm install <package-name>@<tag>`.
147+
|`access` |string |"public" for non-scoped packages. "restricted" for scoped packages.|Determines whether the published package should be publicly visible, or restricted to members of your NPM organization.
143148
|`dryRun` |boolean |false |Run NPM publish with the `--dry-run` flag to prevent publication
149+
|`checkVersion` |boolean |true |Only publish to NPM if the version number in `package.json` differs from the latest on NPM
144150
|`quiet` |boolean |false |Suppress console output from NPM and npm-publish
145151
|`debug` |function |no-op |A function to log debug messages. You can set this to a custom function to receive debug messages, or just set it to `console.debug` to print debug messages to the console.
146152

@@ -153,6 +159,8 @@ The `npmPublish()` function asynchronously returns an object with the following
153159
|`package` |string |The name of the NPM package that was published
154160
|`version` |string |The version number that was published
155161
|`oldVersion` |string |The version number that was previously published to NPM
162+
|`tag` |string |The tag that the package was published to.
163+
|`access` |string |Indicates whether the published package is publicly visible or restricted to members of your NPM organization.
156164
|`dryRun` |boolean |Indicates whether NPM was run in "dry run" mode
157165

158166

@@ -190,6 +198,16 @@ options:
190198

191199
--registry <url> The NPM registry URL to use
192200

201+
--tag <tag> The tag to publish to. Allows the package to be installed
202+
using "npm install <package-name>@<tag>"
203+
204+
--access <access> "public" = The package will be publicly visible.
205+
"restricted" = The package will only be visible to members
206+
of your NPM organization.
207+
208+
--dry-run Don't actually publish to NPM, but report what would have
209+
been published
210+
193211
--debug, -d Enable debug mode, with increased logging
194212

195213
--quiet, -q Suppress unnecessary output
@@ -198,9 +216,6 @@ options:
198216

199217
--help, -h Show help
200218

201-
--dry-run Don't actually publish to NPM, but report what would have
202-
been published
203-
204219
package_path The absolute or relative path of the NPM package to publish.
205220
Can be a directory path, or the path of a package.json file.
206221
Defaults to the current directory.

0 commit comments

Comments
 (0)