Skip to content

Commit fa3d829

Browse files
bnblukekarryswraithgar
authored
docs: include org instructions in scoped publish (#4772)
* doc: include org instructions in scoped publish * doc: update scope context to add user scopes * Update docs/content/using-npm/scope.md Co-authored-by: Gar <[email protected]> Co-authored-by: Luke Karrys <[email protected]> Co-authored-by: Gar <[email protected]>
1 parent 873ac7a commit fa3d829

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

docs/content/using-npm/scope.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,23 @@ If you wish, you may associate a scope with a registry; see below.
7979

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

82-
To publish a public scoped package, you must specify `--access public` with
83-
the initial publication. This will publish the package and set access
84-
to `public` as if you had run `npm access public` after publishing.
82+
Publishing to a scope, you have two options:
83+
84+
- Publishing to your user scope (example: `@username/module`)
85+
- Publishing to an organization scope (example: `@org/module`)
86+
87+
If publishing a public module to an organization scope, you must
88+
first either create an organization with the name of the scope
89+
that you'd like to publish to or be added to an existing organization
90+
with the appropriate permisssions. For example, if you'd like to
91+
publish to `@org`, you would need to create the `org` organization
92+
on npmjs.com prior to trying to publish.
93+
94+
Scoped packages are not public by default. You will need to specify
95+
`--access public` with the initial `npm publish` command. This will publish
96+
the package and set access to `public` as if you had run `npm access public`
97+
after publishing. You do not need to do this when publishing new versions of
98+
an existing scoped package.
8599

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

0 commit comments

Comments
 (0)