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
|`npmPublish`| Whether to publish the`npm` package to the registry. If`false` the`package.json` version will still be updated.|`true`|
45
+
|`pkgRoot`| Directory path to publish.|`.`|
46
+
|`tarballDir`| Directory path in which to write the the package tarball. If`false` the tarball is not be kept on the file system.|`false`|
47
+
48
+
**Note**: The`pkgRoot` directory must contains a`package.json`. The version will be updated only in the`package.json` and`npm-shrinkwrap.json` within the`pkgRoot` directory.
46
49
47
50
###Npm configuration
48
51
@@ -74,7 +77,7 @@ Each individual plugin can be disabled, replaced or used with other plugins in t
74
77
}
75
78
```
76
79
77
-
The`npmPublish` and`tarballDir` option can be used to skip the publishing to the`npm` registry and instead, release the package tarball with another plugin. For example with the[github](https://github.com/semantic-release/github):
80
+
The`npmPublish` and`tarballDir` option can be used to skip the publishing to the`npm` registry and instead, release the package tarball with another plugin. For example with the[github](https://github.com/semantic-release/github) plugin:
78
81
79
82
```json
80
83
{
@@ -95,3 +98,27 @@ The `npmPublish` and `tarballDir` option can be used to skip the publishing to t
95
98
}
96
99
}
97
100
```
101
+
102
+
When publishing from a sub-directory with the`pkgRoot` option, the`package.json` and`npm-shrinkwrap.json` updated with the new version can be moved to another directory with a`postpublish`[npm script](https://docs.npmjs.com/misc/scripts). For example with the[git](https://github.com/semantic-release/git) plugin:
// If the npm publish plugin is used and has `npmPublish`or `tarballDir` configured, validate them now in order to prevent any release if the configuration is wrong
11
+
// If the npm publish plugin is used and has `npmPublish`, `tarballDir`or `pkgRoot` configured, validate them now in order to prevent any release if the configuration is wrong