Skip to content

Commit 10022db

Browse files
committed
feat(publish): add support for package access
NPM added a new option to publish that allows the user to specify whether their package is public or private. This is primarily meant for use with organizations. Now that organizations are a public feature, this is a more commonly used option. Further information on the option can be found in the official documentation: https://docs.npmjs.com/cli/publish
1 parent 671ed58 commit 10022db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/publish.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ function publish (options) {
1515
debug('publishing with a tag', options.tag)
1616
command += ' --tag ' + options.tag
1717
}
18+
19+
if (is.unemptyString(options.access)) {
20+
debug('publishing with specific access', options.access)
21+
command += ' --access ' + options.access
22+
}
23+
1824
return run(command)
1925
.catch(function (info) {
2026
debug('publishing hit an error')

0 commit comments

Comments
 (0)