Skip to content

doc: include org instructions in scoped publish #4772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions docs/content/using-npm/scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,23 @@ If you wish, you may associate a scope with a registry; see below.

#### Publishing public scoped packages to the primary npm registry

To publish a public scoped package, you must specify `--access public` with
the initial publication. This will publish the package and set access
to `public` as if you had run `npm access public` after publishing.
Publishing to a scope, you have two options:

- Publishing to your user scope (example: `@username/module`)
- Publishing to an organization scope (example: `@org/module`)

If publishing a public module to an organization scope, you must
first either create an organization with the name of the scope
that you'd like to publish to or be added to an existing organization
with the appropriate permisssions. For example, if you'd like to
publish to `@org`, you would need to create the `org` organization
on npmjs.com prior to trying to publish.

Scoped packages are not public by default. You will need to specify
`--access public` with the initial `npm publish` command. This will publish
the package and set access to `public` as if you had run `npm access public`
after publishing. You do not need to do this when publishing new versions of
an existing scoped package.

#### Publishing private scoped packages to the npm registry

Expand Down