summaryrefslogtreecommitdiff
path: root/deps/npm/man/man7/npm-scope.7
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/man/man7/npm-scope.7')
-rw-r--r--deps/npm/man/man7/npm-scope.739
1 files changed, 23 insertions, 16 deletions
diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7
index 5d362460c6..be3a322b5c 100644
--- a/deps/npm/man/man7/npm-scope.7
+++ b/deps/npm/man/man7/npm-scope.7
@@ -1,12 +1,12 @@
-.TH "NPM\-SCOPE" "7" "January 2017" "" ""
+.TH "NPM\-SCOPE" "7" "February 2017" "" ""
.SH "NAME"
\fBnpm-scope\fR \- Scoped packages
.SH DESCRIPTION
.P
All npm packages have a name\. Some package names also have a scope\. A scope
-follows the usual rules for package names (url\-safe characters, no leading dots
-or underscores)\. When used in package names, preceded by an @\-symbol and
-followed by a slash, e\.g\.
+follows the usual rules for package names (URL\-safe characters, no leading dots
+or underscores)\. When used in package names, scopes are preceded by an \fB@\fP symbol
+and followed by a slash, e\.g\.
.P
.RS 2
.nf
@@ -17,20 +17,25 @@ followed by a slash, e\.g\.
Scopes are a way of grouping related packages together, and also affect a few
things about the way npm treats the package\.
.P
+Each npm user/organization has their own scope, and only you can add packages
+in your scope\. This means you don't have to worry about someone taking your
+package name ahead of you\. Thus it is also a good way to signal official packages
+for organizations\.
+.P
Scoped packages can be published and installed as of \fBnpm@2\fP and are supported
-by the primary npm registry\. The npm client is backwards\-compatible with
-un\-scoped registries, so it can be used to work with scoped and un\-scoped
-registries at the same time\.
+by the primary npm registry\. Unscoped packages can depend on scoped packages and
+vice versa\. The npm client is backwards\-compatible with unscoped registries,
+so it can be used to work with scoped and unscoped registries at the same time\.
.SH Installing scoped packages
.P
Scoped packages are installed to a sub\-folder of the regular installation
folder, e\.g\. if your other packages are installed in \fBnode_modules/packagename\fP,
-scoped modules will be in \fBnode_modules/@myorg/packagename\fP\|\. The scope folder
-(\fB@myorg\fP) is simply the name of the scope preceded by an @\-symbol, and can
+scoped modules will be installed in \fBnode_modules/@myorg/packagename\fP\|\. The scope
+folder (\fB@myorg\fP) is simply the name of the scope preceded by an \fB@\fP symbol, and can
contain any number of scoped packages\.
.P
A scoped package is installed by referencing it by name, preceded by an
-@\-symbol, in \fBnpm install\fP:
+\fB@\fP symbol, in \fBnpm install\fP:
.P
.RS 2
.nf
@@ -48,7 +53,7 @@ Or in \fBpackage\.json\fP:
.fi
.RE
.P
-Note that if the @\-symbol is omitted in either case npm will instead attempt to
+Note that if the \fB@\fP symbol is omitted, in either case, npm will instead attempt to
install from GitHub; see npm help \fBnpm\-install\fP\|\.
.SH Requiring scoped packages
.P
@@ -61,8 +66,8 @@ require('@myorg/mypackage')
.fi
.RE
.P
-There is nothing special about the way Node treats scope folders, this is
-just specifying to require the module \fBmypackage\fP in the folder called \fB@myorg\fP\|\.
+There is nothing special about the way Node treats scope folders\. This
+simply requires the \fBmypackage\fP module in the folder named \fB@myorg\fP\|\.
.SH Publishing scoped packages
.P
Scoped packages can be published from the CLI as of \fBnpm@2\fP and can be
@@ -70,13 +75,13 @@ published to any registry that supports them, including the primary npm
registry\.
.P
(As of 2015\-04\-19, and with npm 2\.0 or better, the primary npm registry
-\fBdoes\fR support scoped packages)
+\fBdoes\fR support scoped packages\.)
.P
If you wish, you may associate a scope with a registry; see below\.
.SS Publishing public scoped packages to the primary npm registry
.P
To publish a public scoped package, you must specify \fB\-\-access public\fP with
-the initial publication\. This will publish the package and set access
+the initial publication\. This will publish the package and set access
to \fBpublic\fP as if you had run \fBnpm access public\fP after publishing\.
.SS Publishing private scoped packages to the npm registry
.P
@@ -86,7 +91,7 @@ account\.
.P
You can then publish the module with \fBnpm publish\fP or \fBnpm publish
\-\-access restricted\fP, and it will be present in the npm registry, with
-restricted access\. You can then change the access permissions, if
+restricted access\. You can then change the access permissions, if
desired, with \fBnpm access\fP or on the npmjs\.com website\.
.SH Associating a scope with a registry
.P
@@ -125,6 +130,8 @@ npm help install
npm help publish
.IP \(bu 2
npm help access
+.IP \(bu 2
+npm help 7 registry
.RE