diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 0000000000000..db9d16e701054 --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,49 @@ +--- +name: Benchmark Suite + +on: + push: + branches: + - "latest" + pull_request: + branches: + - "**" + +jobs: + build: + name: Trigger Benchmarks + + runs-on: ubuntu-latest + + steps: + # Checkout the npm/cli repo + - uses: actions/checkout@v1.1.0 + + # Installs the specific version of nodejs + - name: Use nodejs 12.x + uses: actions/setup-node@v1 + with: + node-version: "12.x" + + # Trigger Webhook + - name: Trigger Webhook + env: + DISPATCH_REPO: "benchmarks" + DISPATCH_OWNER: "npm" + run: | + curl \ + -s \ + -X POST https://api.github.com/repos/${DISPATCH_OWNER}/${DISPATCH_REPO}/dispatches \ + -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Authorization: token ${{ secrets.NPM_DEPLOY_USER_PAT }}" \ + -d \ + ' + { + "event_type": "${{ github.event_name }}", + "client_payload": { + "pr_id": "${{ github.event.pull_request.number }}", + "repo": "${{ github.event.repository.name }}", + "owner": "${{ github.event.repository.owner.login }}", + "commit_sha": "${{ github.event.after }}" + } + }' diff --git a/.gitignore b/.gitignore index 27c4f27bf47a0..763bb30e749f8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ npm-debug.log /docs/.cache/ /docs/node_modules/ /man/ -/doc/*/npm-index.md /npmrc /release/ /npm-*.tgz @@ -25,3 +24,4 @@ npm-debug.log .nyc_output /test/npm_cache* /node_modules/.cache +.DS_Store \ No newline at end of file diff --git a/.npmignore b/.npmignore index 12efef27852da..c42aaf956257d 100644 --- a/.npmignore +++ b/.npmignore @@ -1,11 +1,13 @@ *.swp .*.swp +netlify.toml npm-debug.log /.github /test node_modules/marked node_modules/marked-man node_modules/tap +tap-snapshots node_modules/.bin node_modules/npm-registry-mock /npmrc diff --git a/AUTHORS b/AUTHORS index 173358ade7719..eef45f2df19be 100644 --- a/AUTHORS +++ b/AUTHORS @@ -667,3 +667,8 @@ Jason Etcovitch Darcy Clarke orion NoDocCat +joan xie +Amal Hussein +Brett Zamir +Menelaos Kotsollaris +Mehdi Hasan Khan diff --git a/CHANGELOG.md b/CHANGELOG.md index f655bd00ac8e8..d83c57f6d9a77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,61 @@ +## 6.13.1 (2019-11-18) + +### BUG FIXES + +* [`938d6124d`](https://github.com/npm/cli/commit/938d6124d6d15d96b5a69d0ae32ef59fceb8ceab) + [#472](https://github.com/npm/cli/pull/472) + fix(fund): support funding string shorthand + ([@ruyadorno](https://github.com/ruyadorno)) +* [`b49c5535b`](https://github.com/npm/cli/commit/b49c5535b7c41729a8d167b035924c3c66b36de0) + [#471](https://github.com/npm/cli/pull/471) + should not publish tap-snapshot folder + ([@ruyadorno](https://github.com/ruyadorno)) +* [`3471d5200`](https://github.com/npm/cli/commit/3471d5200217bfa612b1a262e36c9c043a52eb09) + [#253](https://github.com/npm/cli/pull/253) + Add preliminary WSL support for npm and npx + ([@infinnie](https://github.com/infinnie)) +* [`3ef295f23`](https://github.com/npm/cli/commit/3ef295f23ee1b2300abf13ec19e935c47a455179) + [#486](https://github.com/npm/cli/pull/486) + print quick audit report for human output + ([@isaacs](https://github.com/isaacs)) + +### TESTING + +* [`dbbf977ac`](https://github.com/npm/cli/commit/dbbf977acd1e74bcdec859c562ea4a2bc0536442) + [#278](https://github.com/npm/cli/pull/278) + added workflow to trigger and run benchmarks + ([@mikemimik](https://github.com/mikemimik)) +* [`b4f5e3825`](https://github.com/npm/cli/commit/b4f5e3825535256aaada09c5e8f104570a3d96a4) + [#457](https://github.com/npm/cli/pull/457) + feat(docs): adding tests and updating docs to reflect changes in registry teams API. + ([@nomadtechie](https://github.com/nomadtechie)) +* [`454c7dd60`](https://github.com/npm/cli/commit/454c7dd60c78371bf606f11a17ed0299025bc37c) + [#456](https://github.com/npm/cli/pull/456) + fix git configs for git 2.23 and above + ([@isaacs](https://github.com/isaacs)) + +### DOCUMENTATION + +* [`b8c1576a4`](https://github.com/npm/cli/commit/b8c1576a448566397c721655b95fc90bf202b35a) [`30b013ae8`](https://github.com/npm/cli/commit/30b013ae8eacd04b1b8a41ce2ed0dd50c8ebae25) [`26c1b2ef6`](https://github.com/npm/cli/commit/26c1b2ef6be1595d28d935d35faa8ec72daae544) [`9f943a765`](https://github.com/npm/cli/commit/9f943a765faf6ebb8a442e862b808dbb630e018d) [`c0346b158`](https://github.com/npm/cli/commit/c0346b158fc25ab6ca9954d4dd78d9e62f573a41) [`8e09d5ad6`](https://github.com/npm/cli/commit/8e09d5ad67d4f142241193cecbce61c659389be3) [`4a2f551ee`](https://github.com/npm/cli/commit/4a2f551eeb3285f6f200534da33644789715a41a) [`87d67258c`](https://github.com/npm/cli/commit/87d67258c213d9ea9a49ce1804294a718f08ff13) [`5c3b32722`](https://github.com/npm/cli/commit/5c3b3272234764c8b4d2d798b69af077b5a529c7) [`b150eaeff`](https://github.com/npm/cli/commit/b150eaeff428180bfa03be53fd741d5625897758) [`7555a743c`](https://github.com/npm/cli/commit/7555a743ce4c3146d6245dd63f91503c7f439a6c) [`b89423e2f`](https://github.com/npm/cli/commit/b89423e2f6a09b290b15254e7ff7e8033b434d83) + [#463](https://github.com/npm/cli/pull/463) + [#285](https://github.com/npm/cli/pull/285) + [#268](https://github.com/npm/cli/pull/268) + [#232](https://github.com/npm/cli/pull/232) + [#485](https://github.com/npm/cli/pull/485) + [#453](https://github.com/npm/cli/pull/453) + docs cleanup: typos, styling and content + ([@claudiahdz](https://github.com/claudiahdz)) + ([@XhmikosR](https://github.com/XhmikosR)) + ([@mugli](https://github.com/mugli)) + ([@brettz9](https://github.com/brettz9)) + ([@mkotsollaris](https://github.com/mkotsollaris)) + +### DEPENDENCIES + +* [`661d86cd2`](https://github.com/npm/cli/commit/661d86cd229b14ddf687b7f25a66941a79d233e7) + `make-fetch-happen@5.0.2` + ([@claudiahdz](https://github.com/claudiahdz)) + ## 6.13.0 (2019-11-05) ### NEW FEATURES diff --git a/bin/npm b/bin/npm index 4183703a7857e..737d1f1706489 100755 --- a/bin/npm +++ b/bin/npm @@ -8,6 +8,10 @@ case `uname` in esac NODE_EXE="$basedir/node.exe" +if [ -x "$NODE_EXE" ] && [ -f "/bin/wslpath" ]; then # run the corresponding command prompt when Node for Windows is executed within WSL + cmd.exe /c `wslpath -w "$basedir/npm.cmd"` "$@" + exit $? +fi if ! [ -x "$NODE_EXE" ]; then NODE_EXE="$basedir/node" fi diff --git a/bin/npx b/bin/npx index 261e339850da5..3516c8c415dba 100644 --- a/bin/npx +++ b/bin/npx @@ -8,6 +8,10 @@ case `uname` in esac NODE_EXE="$basedir/node.exe" +if [ -x "$NODE_EXE" ] && [ -f "/bin/wslpath" ]; then # run the corresponding command prompt when Node for Windows is executed within WSL + cmd.exe /c `wslpath -w "$basedir/npx.cmd"` "$@" + exit $? +fi if ! [ -x "$NODE_EXE" ]; then NODE_EXE=node fi diff --git a/docs/content/cli-commands/npm-access.md b/docs/content/cli-commands/npm-access.md old mode 100755 new mode 100644 index f2411af26e761..0fbce9c0759d1 --- a/docs/content/cli-commands/npm-access.md +++ b/docs/content/cli-commands/npm-access.md @@ -4,7 +4,7 @@ title: npm-access description: Set access level on published packages --- -# npm-access +# npm-access(1) ## Set access level on published packages diff --git a/docs/content/cli-commands/npm-adduser.md b/docs/content/cli-commands/npm-adduser.md old mode 100755 new mode 100644 index 0a549005f1e3a..2df35e45fc550 --- a/docs/content/cli-commands/npm-adduser.md +++ b/docs/content/cli-commands/npm-adduser.md @@ -4,7 +4,7 @@ title: npm-adduser description: Set access level on published packages --- -# npm-adduser +# npm-adduser(1) ## Add a registry user account @@ -20,7 +20,7 @@ aliases: login, add-user Create or verify a user named `` in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, -the default registry will be used (see [`npm-config`](npm-config)). +the default registry will be used (see [`config`](/using-npm/config)). The username, password, and email are read in from prompts. @@ -43,14 +43,14 @@ Default: https://registry.npmjs.org/ The base URL of the npm package registry. If `scope` is also specified, this registry will only be used for packages with that scope. `scope` defaults -to the scope of the project directory you're currently in, if any. See [`npm-scope`](/docs/using-npm/scope). +to the scope of the project directory you're currently in, if any. See [`scope`](/using-npm/scope). #### scope Default: none If specified, the user and login credentials given will be associated -with the specified scope. See [`npm-scope`](/docs/using-npm/scope). You can use both at the same time, +with the specified scope. See [`scope`](/using-npm/scope). You can use both at the same time, e.g. ```bash @@ -75,9 +75,7 @@ registries. Can be used with `--registry` and / or `--scope`, e.g. This will ensure that all requests to that registry (including for tarballs) include an authorization header. This setting may be necessary for use with private registries where metadata and package tarballs are stored on hosts with -different hostnames. See `always-auth` in [`npm-config`](/docs/using-npm/config) for more details on -always-auth. Registry-specific configuration of `always-auth` takes precedence -over any global configuration. +different hostnames. See `always-auth` in [`config`](/using-npm/config) for more details on always-auth. Registry-specific configuration of `always-auth` takes precedence over any global configuration. #### auth-type diff --git a/docs/content/cli-commands/npm-audit.md b/docs/content/cli-commands/npm-audit.md old mode 100755 new mode 100644 index 22b238a1f7159..0aba874f96df8 --- a/docs/content/cli-commands/npm-audit.md +++ b/docs/content/cli-commands/npm-audit.md @@ -4,7 +4,7 @@ title: npm-audit description: Run a security audit --- -# npm-audit +# npm-audit(1) ## Run a security audit diff --git a/docs/content/cli-commands/npm-bin.md b/docs/content/cli-commands/npm-bin.md old mode 100755 new mode 100644 index b612ea3cfe8c3..6c7ce0eee54e2 --- a/docs/content/cli-commands/npm-bin.md +++ b/docs/content/cli-commands/npm-bin.md @@ -4,7 +4,7 @@ title: npm-bin description: Display npm bin folder --- -# npm-bin +# npm-bin(1) ## Display npm bin folder diff --git a/docs/content/cli-commands/npm-bugs.md b/docs/content/cli-commands/npm-bugs.md old mode 100755 new mode 100644 index 46a3505808deb..dcc9c358df14d --- a/docs/content/cli-commands/npm-bugs.md +++ b/docs/content/cli-commands/npm-bugs.md @@ -4,7 +4,7 @@ title: npm-bugs description: Bugs for a package in a web browser maybe --- -# npm-bugs +# npm-bugs(1) ## Bugs for a package in a web browser maybe diff --git a/docs/content/cli-commands/npm-build.md b/docs/content/cli-commands/npm-build.md old mode 100755 new mode 100644 index 7d599b0a4b06d..b657129787663 --- a/docs/content/cli-commands/npm-build.md +++ b/docs/content/cli-commands/npm-build.md @@ -4,7 +4,7 @@ title: npm-build description: Build a package --- -# npm-build +# npm-build(1) ## Build a package diff --git a/docs/content/cli-commands/npm-bundle.md b/docs/content/cli-commands/npm-bundle.md old mode 100755 new mode 100644 index 8de9dc15c2d61..76417ac8b0b0c --- a/docs/content/cli-commands/npm-bundle.md +++ b/docs/content/cli-commands/npm-bundle.md @@ -4,7 +4,7 @@ title: npm-bundle description: REMOVED --- -# npm-bundle +# npm-bundle(1) ## REMOVED diff --git a/docs/content/cli-commands/npm-cache.md b/docs/content/cli-commands/npm-cache.md old mode 100755 new mode 100644 index 143cd9285b881..ed31a320421b0 --- a/docs/content/cli-commands/npm-cache.md +++ b/docs/content/cli-commands/npm-cache.md @@ -4,7 +4,7 @@ title: npm-cache description: Manipulates packages cache --- -# npm-cache +# npm-cache(1) ## Manipulates packages cache diff --git a/docs/content/cli-commands/npm-ci.md b/docs/content/cli-commands/npm-ci.md old mode 100755 new mode 100644 index 88d12a7e6aa15..357ba16cf6ade --- a/docs/content/cli-commands/npm-ci.md +++ b/docs/content/cli-commands/npm-ci.md @@ -4,7 +4,7 @@ title: npm-ci description: Install a project with a clean slate --- -# npm-ci +# npm-ci(1) ## Install a project with a clean slate @@ -45,7 +45,7 @@ cache: ### Description -This command is similar to [`npm-install`](npm-install), except it's meant to be used in +This command is similar to [`npm install`](/cli-commands/npm-install), except it's meant to be used in automated environments such as test platforms, continuous integration, and deployment -- or any situation where you want to make sure you're doing a clean install of your dependencies. It can be significantly faster than a regular npm diff --git a/docs/content/cli-commands/npm-completion.md b/docs/content/cli-commands/npm-completion.md old mode 100755 new mode 100644 index 87685966df016..59bfca503e084 --- a/docs/content/cli-commands/npm-completion.md +++ b/docs/content/cli-commands/npm-completion.md @@ -4,7 +4,7 @@ title: npm-completion description: Tab Completion for npm --- -# npm-completion +# npm-completion(1) ## Tab Completion for npm diff --git a/docs/content/cli-commands/npm-config.md b/docs/content/cli-commands/npm-config.md old mode 100755 new mode 100644 index 7082603d11a7b..c2f2033b066d2 --- a/docs/content/cli-commands/npm-config.md +++ b/docs/content/cli-commands/npm-config.md @@ -4,7 +4,7 @@ title: npm-config description: Manage the npm configuration files --- -# npm-config +# npm-config(1) ## Manage the npm configuration files @@ -26,9 +26,9 @@ aliases: c npm gets its config settings from the command line, environment variables, `npmrc` files, and in some cases, the `package.json` file. -See [npmrc](/docs/configuring-npm/npmrc) for more information about the npmrc files. +See [npmrc](/configuring-npm/npmrc) for more information about the npmrc files. -See [config](/docs/using-npm/config) for a more thorough discussion of the mechanisms +See [config](/using-npm/config) for a more thorough discussion of the mechanisms involved. The `npm config` command can be used to update and edit the contents diff --git a/docs/content/cli-commands/npm-dedupe.md b/docs/content/cli-commands/npm-dedupe.md old mode 100755 new mode 100644 index a4abf53dff107..e15a12ba7c18a --- a/docs/content/cli-commands/npm-dedupe.md +++ b/docs/content/cli-commands/npm-dedupe.md @@ -4,7 +4,7 @@ title: npm-dedupe description: Reduce duplication --- -# npm-dedupe +# npm-dedupe(1) ## Reduce duplication @@ -32,7 +32,7 @@ a `-- c@1.0.10 ``` -In this case, `npm-dedupe` will transform the tree to: +In this case, `npm dedupe` will transform the tree to: ```bash a diff --git a/docs/content/cli-commands/npm-deprecate.md b/docs/content/cli-commands/npm-deprecate.md old mode 100755 new mode 100644 index 29fcd62cdacd0..d2d9613f653c6 --- a/docs/content/cli-commands/npm-deprecate.md +++ b/docs/content/cli-commands/npm-deprecate.md @@ -3,7 +3,7 @@ section: cli-commands title: npm-deprecate description: Deprecate a version of a package --- -# npm-deprecate +# npm-deprecate(1) ## Deprecate a version of a package diff --git a/docs/content/cli-commands/npm-dist-tag.md b/docs/content/cli-commands/npm-dist-tag.md old mode 100755 new mode 100644 index 501975dc50e99..c7921c7f739d7 --- a/docs/content/cli-commands/npm-dist-tag.md +++ b/docs/content/cli-commands/npm-dist-tag.md @@ -4,7 +4,7 @@ title: npm-dist-tag description: Modify package distribution tags --- -# npm-dist-tag +# npm-dist-tag(1) ## Modify package distribution tags diff --git a/docs/content/cli-commands/npm-docs.md b/docs/content/cli-commands/npm-docs.md old mode 100755 new mode 100644 index b53cc5740e60f..46f5cd0d900a4 --- a/docs/content/cli-commands/npm-docs.md +++ b/docs/content/cli-commands/npm-docs.md @@ -4,11 +4,10 @@ title: npm-docs description: Docs for a package in a web browser maybe --- -# npm-docs +# npm-docs(1) ## Docs for a package in a web browser maybe - ### Synopsis ```bash diff --git a/docs/content/cli-commands/npm-doctor.md b/docs/content/cli-commands/npm-doctor.md old mode 100755 new mode 100644 index 12f7e2b66e753..7cec349e5a814 --- a/docs/content/cli-commands/npm-doctor.md +++ b/docs/content/cli-commands/npm-doctor.md @@ -4,7 +4,7 @@ title: npm-doctor description: Check your environments --- -# npm-doctor +# npm-doctor(1) ## Check your environments diff --git a/docs/content/cli-commands/npm-edit.md b/docs/content/cli-commands/npm-edit.md old mode 100755 new mode 100644 index fe62e34cbe8fc..94b6a087fa102 --- a/docs/content/cli-commands/npm-edit.md +++ b/docs/content/cli-commands/npm-edit.md @@ -4,7 +4,7 @@ title: npm-edit description: Edit an installed package --- -# npm-edit +# npm-edit(1) ## Edit an installed package diff --git a/docs/content/cli-commands/npm-explore.md b/docs/content/cli-commands/npm-explore.md old mode 100755 new mode 100644 index e690e57544e8a..8ded96d40984f --- a/docs/content/cli-commands/npm-explore.md +++ b/docs/content/cli-commands/npm-explore.md @@ -4,9 +4,9 @@ title: npm-explore description: Browse an installed package --- -# npm-explore +# npm-explore(1) -## description: Browse an installed package +## Browse an installed package ### Synopsis diff --git a/docs/content/cli-commands/npm-fund.md b/docs/content/cli-commands/npm-fund.md index f6ad5a9fbf523..64894e291fc4f 100644 --- a/docs/content/cli-commands/npm-fund.md +++ b/docs/content/cli-commands/npm-fund.md @@ -4,7 +4,7 @@ title: npm-fund description: Retrieve funding information --- -# npm-fund +# npm-fund(1) ## Retrieve funding information @@ -53,8 +53,8 @@ Set it to `false` in order to use all-ansi output. ## See Also -* [npm-docs](/cli-commands/npm-docs) -* [npm-config](/cli-commands/npm-config) -* [npm-install](/cli-commands/npm-install) -* [npm-ls](/cli-commands/npm-ls) +* [npm docs](/cli-commands/npm-docs) +* [npm config](/cli-commands/npm-config) +* [npm install](/cli-commands/npm-install) +* [npm ls](/cli-commands/npm-ls) diff --git a/docs/content/cli-commands/npm-help-search.md b/docs/content/cli-commands/npm-help-search.md old mode 100755 new mode 100644 index be5ba1410e735..69d005cb160ed --- a/docs/content/cli-commands/npm-help-search.md +++ b/docs/content/cli-commands/npm-help-search.md @@ -4,7 +4,7 @@ title: npm-help-search description: Search npm help documentation --- -# npm-help-search +# npm-help-search(1) ## Search npm help documentation diff --git a/docs/content/cli-commands/npm-help.md b/docs/content/cli-commands/npm-help.md old mode 100755 new mode 100644 index c5fbbe78c4012..c47676ffcac1d --- a/docs/content/cli-commands/npm-help.md +++ b/docs/content/cli-commands/npm-help.md @@ -4,7 +4,7 @@ title: npm-help description: Get help on npm --- -# npm-help +# npm-help(1) ## Get help on npm diff --git a/docs/content/cli-commands/npm-hook.md b/docs/content/cli-commands/npm-hook.md old mode 100755 new mode 100644 index db935be301684..ce4bbccb3593b --- a/docs/content/cli-commands/npm-hook.md +++ b/docs/content/cli-commands/npm-hook.md @@ -4,7 +4,7 @@ title: npm-hook description: Manage registry hooks --- -# npm-hook +# npm-hook(1) ## Manage registry hooks @@ -56,8 +56,7 @@ $ npm hook rm id-deadbeef ### Description -Allows you to manage [npm -hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm), +Allows you to manage [npm hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm), including adding, removing, listing, and updating. Hooks allow you to configure URL endpoints that will be notified whenever a diff --git a/docs/content/cli-commands/npm-init.md b/docs/content/cli-commands/npm-init.md old mode 100755 new mode 100644 index 10938aa7011fd..73ad74b23ea99 --- a/docs/content/cli-commands/npm-init.md +++ b/docs/content/cli-commands/npm-init.md @@ -4,7 +4,7 @@ title: npm-init description: create a package.json file --- -# npm-init +# npm-init(1) ## create a package.json file diff --git a/docs/content/cli-commands/npm-install-ci-test.md b/docs/content/cli-commands/npm-install-ci-test.md old mode 100755 new mode 100644 index 46cab812cbe98..98e40f4b27a77 --- a/docs/content/cli-commands/npm-install-ci-test.md +++ b/docs/content/cli-commands/npm-install-ci-test.md @@ -4,7 +4,7 @@ title: npm-install-ci-test description: Install a project with a clean slate and run tests --- -# npm install-ci-test +# npm install-ci-test(1) ## Install a project with a clean slate and run tests diff --git a/docs/content/cli-commands/npm-install-test.md b/docs/content/cli-commands/npm-install-test.md old mode 100755 new mode 100644 index 69912084c1be3..b86a5199117c4 --- a/docs/content/cli-commands/npm-install-test.md +++ b/docs/content/cli-commands/npm-install-test.md @@ -4,7 +4,7 @@ title: npm-install-test description: Install package(s) and run tests --- -# npm install-test +# npm install-test(1) ## Install package(s) and run tests diff --git a/docs/content/cli-commands/npm-install.md b/docs/content/cli-commands/npm-install.md old mode 100755 new mode 100644 index 523fd68f96a49..8e661bf643f39 --- a/docs/content/cli-commands/npm-install.md +++ b/docs/content/cli-commands/npm-install.md @@ -4,7 +4,7 @@ title: npm-install description: Install a package --- -# npm-install +# npm-install(1) ## Install a package @@ -16,6 +16,7 @@ npm install [<@scope>/] npm install [<@scope>/]@ npm install [<@scope>/]@ npm install [<@scope>/]@ +npm install @npm: npm install :/ npm install npm install @@ -31,15 +32,15 @@ common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exa This command installs a package, and any packages that it depends on. If the package has a package-lock or shrinkwrap file, the installation of dependencies will be driven by that, with an `npm-shrinkwrap.json` taking precedence if both -files exist. See [package-lock.json](/docs/configuring-npm/package-lock.json) and [`npm-shrinkwrap`](npm-shrinkwrap). +files exist. See [package-lock.json](/configuring-npm/package-lock-json) and [`npm shrinkwrap`](/cli-commands/npm-shrinkwrap). A `package` is: -* a) a folder containing a program described by a [`package.json`](/docs/configuring-npm/package-json) file +* a) a folder containing a program described by a [`package.json`](/configuring-npm/package-json) file * b) a gzipped tarball containing (a) * c) a url that resolves to (b) -* d) a `@` that is published on the registry (see [`npm-registry`](npm-registry)) with (c) -* e) a `@` (see [`npm-dist-tag`](npm-dist-tag)) that points to (d) +* d) a `@` that is published on the registry (see [`registry`](/using-npm/registry)) with (c) +* e) a `@` (see [`npm dist-tag`](/cli-commands/npm-dist-tag)) that points to (d) * f) a `` that has a "latest" tag satisfying (e) * g) a `` that resolves to (a) @@ -58,11 +59,13 @@ after packing it up into a tarball (b). directory) as a global package. By default, `npm install` will install all modules listed as dependencies - in [`package.json`](/docs/configuring-npm/package-json). + in [`package.json`](/configuring-npm/package-json). With the `--production` flag (or when the `NODE_ENV` environment variable is set to `production`), npm will not install modules listed in - `devDependencies`. + `devDependencies`. To install all modules listed in both `dependencies` + and `devDependencies` when `NODE_ENV` environment variable is set to `production`, + you can use `--production=false`. > NOTE: The `--production` flag has no particular meaning when adding a dependency to a project. @@ -102,7 +105,7 @@ after packing it up into a tarball (b). * `npm install [<@scope>/]`: Do a `@` install, where `` is the "tag" config. (See - [`npm-config`](/docs/using-npm/config). The config's default value is `latest`.) + [`config`](/using-npm/config). The config's default value is `latest`.) In most cases, this will install the version of the modules tagged as `latest` on the npm registry. @@ -111,6 +114,24 @@ after packing it up into a tarball (b). npm install sax +* `npm install @npm:`: + + Install a package under a custom alias. Allows multiple versions of + a same-name package side-by-side, more convenient import names for + packages with otherwise long ones and using git forks replacements + or forked npm packages as replacements. Aliasing works only on your + project and does not rename packages in transitive dependencies. + Aliases should follow the naming conventions stated in + [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules). + + Examples: + + npm install my-react@npm:react + npm install jquery2@npm:jquery@2 + npm install jquery3@npm:jquery@3 + npm install npa@npm:npm-package-arg + + `npm install` saves any specified packages into `dependencies` by default. Additionally, you can control where and how they get saved with some additional flags: @@ -138,7 +159,7 @@ after packing it up into a tarball (b). `` is optional. The package will be downloaded from the registry associated with the specified scope. If no registry is associated with - the given scope the default registry is assumed. See [`npm-scope`](/docs/using-npm/scope). + the given scope the default registry is assumed. See [`scope`](/using-npm/scope). Note: if you do not include the @-symbol on your scope name, npm will interpret this as a GitHub repository instead, see below. Scopes names @@ -188,7 +209,7 @@ after packing it up into a tarball (b). * `npm install [<@scope>/]@`: Install a version of the package matching the specified version range. This - will follow the same rules for resolving dependencies described in [`package.json`](/docs/configuring-npm/package-json). + will follow the same rules for resolving dependencies described in [`package.json`](/configuring-npm/package-json). Note that most version ranges must be put in quotes so that your shell will treat it as a single argument. @@ -358,11 +379,11 @@ npm install sax --force ``` The `--no-fund` argument will hide the message displayed at the end of each -install that aknowledges the number of dependencies looking for funding. +install that acknowledges the number of dependencies looking for funding. See `npm-fund(1)` The `-g` or `--global` argument will cause npm to install the package globally -rather than locally. See [npm-folders](/docs/configuring-npm/folders). +rather than locally. See [folders](/configuring-npm/folders). The `--global-style` argument will cause npm to install the package into your local `node_modules` folder with the same layout it uses with the @@ -371,7 +392,7 @@ global `node_modules` folder. Only your direct dependencies will show in `node_modules` folders. This obviously will eliminate some deduping. The `--ignore-scripts` argument will cause npm to not execute any -scripts defined in the package.json. See [`npm-scripts`](/docs/using-npm/scripts). +scripts defined in the package.json. See [`scripts`](/using-npm/scripts). The `--legacy-bundling` argument will cause npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, @@ -402,7 +423,7 @@ The `--only={prod[uction]|dev[elopment]}` argument will cause either only The `--no-audit` argument can be used to disable sending of audit reports to the configured registries. See [`npm-audit`](npm-audit) for details on what is sent. -See [`npm-config`](/docs/using-npm/config). Many of the configuration params have some +See [`config`](/using-npm/config). Many of the configuration params have some effect on installation, since that's most of what npm does. #### Algorithm @@ -450,8 +471,7 @@ privately for itself. This algorithm is deterministic, but different trees may be produced if two dependencies are requested for installation in a different order. -See [npm-folders](/docs/configuring-npm/folders) for a more detailed description of the specific -folder structures that npm creates. +See [folders](/configuring-npm/folders) for a more detailed description of the specific folder structures that npm creates. ### Limitations of npm's Install Algorithm diff --git a/docs/content/cli-commands/npm-link.md b/docs/content/cli-commands/npm-link.md old mode 100755 new mode 100644 index c93b9177cccde..5c417dd143778 --- a/docs/content/cli-commands/npm-link.md +++ b/docs/content/cli-commands/npm-link.md @@ -4,7 +4,7 @@ title: npm-link description: Symlink a package folder --- -# npm-link +# npm-link(1) ## Symlink a package folder @@ -33,7 +33,7 @@ of the current folder. Note that `package-name` is taken from `package.json`, not from directory name. -The package name can be optionally prefixed with a scope. See [`npm-scope`](npm-scope). +The package name can be optionally prefixed with a scope. See [`scope`](/using-npm/npm-scope). The scope must be preceded by an @-symbol and followed by a slash. When creating tarballs for `npm publish`, the linked packages are @@ -76,8 +76,7 @@ installation target into your project's `node_modules` folder. Note that in this case, you are referring to the directory name, `node-redis`, rather than the package name `redis`. -If your linked package is scoped (see [`npm-scope`](npm-scope)) your link command must -include that scope, e.g. +If your linked package is scoped (see [`scope`](/using-npm/npm-scope)) your link command must include that scope, e.g. ```bash npm link @myorg/privatepackage diff --git a/docs/content/cli-commands/npm-logout.md b/docs/content/cli-commands/npm-logout.md old mode 100755 new mode 100644 index 7a5cf047034bf..ca7d86f2d1960 --- a/docs/content/cli-commands/npm-logout.md +++ b/docs/content/cli-commands/npm-logout.md @@ -4,7 +4,7 @@ title: npm-logout description: Log out of the registry --- -# npm-logout +# npm-logout(1) ## Log out of the registry @@ -40,7 +40,7 @@ it takes precedence. Default: The scope of your current project, if any, otherwise none. -If specified, you will be logged out of the specified scope. See [`npm-scope`](npm-scope). +If specified, you will be logged out of the specified scope. See [`scope`](/using-npm/npm-scope). ```bash npm logout --scope=@myco diff --git a/docs/content/cli-commands/npm-ls.md b/docs/content/cli-commands/npm-ls.md old mode 100755 new mode 100644 index 703b319b40dae..64a399155ff60 --- a/docs/content/cli-commands/npm-ls.md +++ b/docs/content/cli-commands/npm-ls.md @@ -4,7 +4,7 @@ title: npm-ls description: List installed packages --- -# npm-ls +# npm-ls(1) ## List installed packages diff --git a/docs/content/cli-commands/npm-org.md b/docs/content/cli-commands/npm-org.md old mode 100755 new mode 100644 index 3dca586670e5d..33db38d0f82a5 --- a/docs/content/cli-commands/npm-org.md +++ b/docs/content/cli-commands/npm-org.md @@ -4,7 +4,7 @@ title: npm-org description: Manage orgs --- -# npm-org +# npm-org(1) ## Manage orgs diff --git a/docs/content/cli-commands/npm-outdated.md b/docs/content/cli-commands/npm-outdated.md old mode 100755 new mode 100644 index 44ec0b3cf2485..c7934109dca37 --- a/docs/content/cli-commands/npm-outdated.md +++ b/docs/content/cli-commands/npm-outdated.md @@ -4,7 +4,7 @@ title: npm-outdated description: Check for outdated packages --- -# npm-outdated +# npm-outdated(1) ## Check for outdated packages diff --git a/docs/content/cli-commands/npm-owner.md b/docs/content/cli-commands/npm-owner.md old mode 100755 new mode 100644 index 7c803b915dd47..bc2fbc82fb280 --- a/docs/content/cli-commands/npm-owner.md +++ b/docs/content/cli-commands/npm-owner.md @@ -4,7 +4,7 @@ title: npm-owner description: Manage package owners --- -# npm-owner +# npm-owner(1) ## Manage package owners ### Synopsis diff --git a/docs/content/cli-commands/npm-pack.md b/docs/content/cli-commands/npm-pack.md old mode 100755 new mode 100644 index 70caa02d2b439..acf18559c14e0 --- a/docs/content/cli-commands/npm-pack.md +++ b/docs/content/cli-commands/npm-pack.md @@ -4,7 +4,7 @@ title: npm-pack description: Create a tarball from a package --- -# npm-pack +# npm-pack(1) ## Create a tarball from a package diff --git a/docs/content/cli-commands/npm-ping.md b/docs/content/cli-commands/npm-ping.md old mode 100755 new mode 100644 index 468734bd1f0d2..93d18b57f840b --- a/docs/content/cli-commands/npm-ping.md +++ b/docs/content/cli-commands/npm-ping.md @@ -4,7 +4,7 @@ title: npm-ping description: Ping npm registry --- -# npm-ping +# npm-ping(1) ## Ping npm registry diff --git a/docs/content/cli-commands/npm-prefix.md b/docs/content/cli-commands/npm-prefix.md old mode 100755 new mode 100644 index f2fd3e4f19d4f..b82fec663a147 --- a/docs/content/cli-commands/npm-prefix.md +++ b/docs/content/cli-commands/npm-prefix.md @@ -4,7 +4,7 @@ title: npm-prefix description: Display prefix --- -# npm-prefix +# npm-prefix(1) ## Display prefix @@ -21,7 +21,7 @@ to contain a `package.json` file or `node_modules` directory, unless `-g` is also specified. If `-g` is specified, this will be the value of the global prefix. See -[`npm-config`](npm-config) for more detail. +[`npm config`](/cli-commands/npm-config) for more detail. ### See Also diff --git a/docs/content/cli-commands/npm-profile.md b/docs/content/cli-commands/npm-profile.md old mode 100755 new mode 100644 index 1f3b146b8ad4c..9fe82cd2d3a95 --- a/docs/content/cli-commands/npm-profile.md +++ b/docs/content/cli-commands/npm-profile.md @@ -4,7 +4,7 @@ title: npm-profile description: Change settings on your registry profile --- -# npm-profile +# npm-profile(1) ## Change settings on your registry profile ### Synopsis diff --git a/docs/content/cli-commands/npm-prune.md b/docs/content/cli-commands/npm-prune.md old mode 100755 new mode 100644 index 93c7efe8d4394..c6b61e62f828a --- a/docs/content/cli-commands/npm-prune.md +++ b/docs/content/cli-commands/npm-prune.md @@ -4,7 +4,7 @@ title: npm-prune description: Remove extraneous packages --- -# npm-prune +# npm-prune(1) ## Remove extraneous packages ### Synopsis diff --git a/docs/content/cli-commands/npm-publish.md b/docs/content/cli-commands/npm-publish.md old mode 100755 new mode 100644 index 698aad87a2449..b9d0cf1449e76 --- a/docs/content/cli-commands/npm-publish.md +++ b/docs/content/cli-commands/npm-publish.md @@ -4,7 +4,7 @@ title: npm-publish description: Publish a package --- -# npm-publish +# npm-publish(1) ## Publish a package @@ -22,12 +22,10 @@ Publishes a package to the registry so that it can be installed by name. All files in the package directory are included if no local `.gitignore` or `.npmignore` file exists. If both files exist and a file is ignored by `.gitignore` but not by `.npmignore` then it will be included. See -[`npm-developers`](/docs/using-npm/developers) for full details on what's included in the published -package, as well as details on how the package is built. +[`developers`](/using-npm/developers) for full details on what's included in the published package, as well as details on how the package is built. By default npm will publish to the public registry. This can be overridden by -specifying a different default registry or using a [`npm-scope`](npm-scope) in the name -(see [`package.json`](/docs/configuring-npm/package-json)). +specifying a different default registry or using a [`scope`](/using-npm/npm-scope) in the name (see [`package.json`](/configuring-npm/package-json)). * ``: A folder containing a package.json file @@ -62,13 +60,13 @@ the specified registry. Once a package is published with a given name and version, that specific name and version combination can never be used again, even if -it is removed with [`npm-unpublish`](npm-unpublish). +it is removed with [`npm unpublish`](/cli-commands/npm-unpublish). As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the tarball will be submitted to the registry during publication. Subsequent installs will use the strongest supported algorithm to verify downloads. -Similar to `--dry-run` see [`npm-pack`](npm-pack), which figures out the files to be +Similar to `--dry-run` see [`npm pack`](/cli-commands/npm-pack), which figures out the files to be included and packs them into a tarball to be uploaded to the registry. ### See Also diff --git a/docs/content/cli-commands/npm-rebuild.md b/docs/content/cli-commands/npm-rebuild.md old mode 100755 new mode 100644 index 8ec9c0302de65..414b9ca55a193 --- a/docs/content/cli-commands/npm-rebuild.md +++ b/docs/content/cli-commands/npm-rebuild.md @@ -4,7 +4,7 @@ title: npm-rebuild description: Rebuild a package --- -# npm-rebuildd +# npm-rebuild(1) ## Rebuild a package @@ -18,9 +18,7 @@ alias: npm rb ### Description -This command runs the `npm build` command on the matched folders. This is useful -when you install a new version of node, and must recompile all your C++ addons with -the new binary. +This command runs the `npm build` command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary. ### See Also diff --git a/docs/content/cli-commands/npm-repo.md b/docs/content/cli-commands/npm-repo.md old mode 100755 new mode 100644 index bcebecb69064c..ad41ea571253f --- a/docs/content/cli-commands/npm-repo.md +++ b/docs/content/cli-commands/npm-repo.md @@ -4,7 +4,7 @@ title: npm-repo description: Open package repository page in the browser --- -# npm-repo +# npm-repo(1) ## Open package repository page in the browser diff --git a/docs/content/cli-commands/npm-restart.md b/docs/content/cli-commands/npm-restart.md old mode 100755 new mode 100644 index ba4e589b7ac51..d6d388b224ab1 --- a/docs/content/cli-commands/npm-restart.md +++ b/docs/content/cli-commands/npm-restart.md @@ -4,7 +4,7 @@ title: npm-restart description: Restart a package --- -# npm-restart +# npm-restart(1) ## Restart a package @@ -42,7 +42,7 @@ behavior will be accompanied by an increase in major version number ### See Also * [npm run-script](/cli-commands/npm-run-script) -* [npm scripts](/cli-commands//docs/using-npm/scripts) +* [npm scripts](/using-npm/scripts) * [npm test](/cli-commands/npm-test) * [npm start](/cli-commands/npm-start) * [npm stop](/cli-commands/npm-stop) diff --git a/docs/content/cli-commands/npm-root.md b/docs/content/cli-commands/npm-root.md old mode 100755 new mode 100644 index d654f1c58b42b..2b27878af4c6d --- a/docs/content/cli-commands/npm-root.md +++ b/docs/content/cli-commands/npm-root.md @@ -4,7 +4,7 @@ title: npm-root description: Display npm root --- -# npm-root +# npm-root(1) ## Display npm root diff --git a/docs/content/cli-commands/npm-run-script.md b/docs/content/cli-commands/npm-run-script.md old mode 100755 new mode 100644 index 9d71616ab8ee1..51def74c3c4c3 --- a/docs/content/cli-commands/npm-run-script.md +++ b/docs/content/cli-commands/npm-run-script.md @@ -4,7 +4,7 @@ title: npm-run-script description: Run arbitrary package scripts --- -# npm-run-script +# npm-run-script(1) ## Run arbitrary package scripts diff --git a/docs/content/cli-commands/npm-search.md b/docs/content/cli-commands/npm-search.md old mode 100755 new mode 100644 index 76735e941bd72..e066106faf71f --- a/docs/content/cli-commands/npm-search.md +++ b/docs/content/cli-commands/npm-search.md @@ -4,7 +4,7 @@ title: npm-search description: Search for packages --- -# npm-search +# npm-search(1) ## Search for packages diff --git a/docs/content/cli-commands/npm-shrinkwrap.md b/docs/content/cli-commands/npm-shrinkwrap.md old mode 100755 new mode 100644 index 147ffe393749e..342fb001675ab --- a/docs/content/cli-commands/npm-shrinkwrap.md +++ b/docs/content/cli-commands/npm-shrinkwrap.md @@ -4,7 +4,7 @@ title: npm-shrinkwrap description: Lock down dependency versions for publication --- -# npm-shrinkwrap +# npm-shrinkwrap(1) ## Lock down dependency versions for publication @@ -20,7 +20,7 @@ This command repurposes `package-lock.json` into a publishable `npm-shrinkwrap.json` or simply creates a new one. The file created and updated by this command will then take precedence over any other existing or future `package-lock.json` files. For a detailed explanation of the design and purpose -of package locks in npm, see [npm-package-locks](npm-package-locks). +of package locks in npm, see [package-locks](/configuring-npm/package-locks). ### See Also diff --git a/docs/content/cli-commands/npm-star.md b/docs/content/cli-commands/npm-star.md old mode 100755 new mode 100644 index 77841e03038f1..1912e9c654bc2 --- a/docs/content/cli-commands/npm-star.md +++ b/docs/content/cli-commands/npm-star.md @@ -4,7 +4,7 @@ title: npm-star description: Mark your favorite packages --- -# npm-star +# npm-star(1) ## Mark your favorite packages diff --git a/docs/content/cli-commands/npm-stars.md b/docs/content/cli-commands/npm-stars.md old mode 100755 new mode 100644 index 7dbb9ece8acd5..475547bb4b7f2 --- a/docs/content/cli-commands/npm-stars.md +++ b/docs/content/cli-commands/npm-stars.md @@ -4,7 +4,7 @@ title: npm-stars description: View packages marked as favorites --- -# npm-stars +# npm-stars(1) ## View packages marked as favorites diff --git a/docs/content/cli-commands/npm-start.md b/docs/content/cli-commands/npm-start.md old mode 100755 new mode 100644 index fdbae4b103e09..839528257b6d9 --- a/docs/content/cli-commands/npm-start.md +++ b/docs/content/cli-commands/npm-start.md @@ -4,7 +4,7 @@ title: npm-start description: Start a package --- -# npm-start +# npm-start(1) ## Start a package @@ -21,8 +21,7 @@ its `"scripts"` object. If no `"start"` property is specified on the `"scripts"` object, it will run `node server.js`. As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can -use custom arguments when executing scripts. Refer to [`npm-run-script`](npm-run-script) for -more details. +use custom arguments when executing scripts. Refer to [`npm run-script`](/cli-commands/npm-run-script) for more details. ### See Also diff --git a/docs/content/cli-commands/npm-stop.md b/docs/content/cli-commands/npm-stop.md old mode 100755 new mode 100644 index 62d6478f2e68c..da759047cb19a --- a/docs/content/cli-commands/npm-stop.md +++ b/docs/content/cli-commands/npm-stop.md @@ -4,7 +4,7 @@ title: npm-stop description: Stop a package --- -# npm-stop +# npm-stop(1) ## Stop a package diff --git a/docs/content/cli-commands/npm-team.md b/docs/content/cli-commands/npm-team.md old mode 100755 new mode 100644 index 3401dae26b369..9a63b10c26f32 --- a/docs/content/cli-commands/npm-team.md +++ b/docs/content/cli-commands/npm-team.md @@ -4,7 +4,7 @@ title: npm-team description: Manage organization teams and team memberships --- -# npm-team +# npm-team(1) ## Manage organization teams and team memberships @@ -28,13 +28,10 @@ Used to manage teams in organizations, and change team memberships. Does not handle permissions for packages. Teams must always be fully qualified with the organization/scope they belong to -when operating on them, separated by a colon (`:`). That is, if you have a -`developers` team on a `foo` organization, you must always refer to that team as -`foo:developers` in these commands. +when operating on them, separated by a colon (`:`). That is, if you have a `wombats` team in a `wisdom` organization, you must always refer to that team as `wisdom:wombats` in these commands. * create / destroy: - Create a new team, or destroy an existing one. - + Create a new team, or destroy an existing one. Note: You cannot remove the `developers` team, learn more. * add / rm: Add a user to an existing team, or remove a user from a team they belong to. diff --git a/docs/content/cli-commands/npm-test.md b/docs/content/cli-commands/npm-test.md old mode 100755 new mode 100644 index af393ae99e333..99c027e3e057a --- a/docs/content/cli-commands/npm-test.md +++ b/docs/content/cli-commands/npm-test.md @@ -4,7 +4,7 @@ title: npm-test description: Test a package --- -# npm-test +# npm-test(1) ## Test a package diff --git a/docs/content/cli-commands/npm-token.md b/docs/content/cli-commands/npm-token.md old mode 100755 new mode 100644 index c94fb1819f8b8..37a74083d2a12 --- a/docs/content/cli-commands/npm-token.md +++ b/docs/content/cli-commands/npm-token.md @@ -4,7 +4,7 @@ title: npm-token description: Manage your authentication tokens --- -# npm-token +# npm-token(1) ## Manage your authentication tokens diff --git a/docs/content/cli-commands/npm-uninstall.md b/docs/content/cli-commands/npm-uninstall.md old mode 100755 new mode 100644 index 932e1015c92d7..96fdc4ebe05ba --- a/docs/content/cli-commands/npm-uninstall.md +++ b/docs/content/cli-commands/npm-uninstall.md @@ -4,7 +4,7 @@ title: npm-uninstall description: Remove a package --- -# npm-uninstall +# npm-uninstall(1) ## Remove a package @@ -44,7 +44,7 @@ the package version in your main package.json: Further, if you have an `npm-shrinkwrap.json` then it will be updated as well. -Scope is optional and follows the usual rules for [`npm-scope`](snpm-scope). +Scope is optional and follows the usual rules for [`scope`](/using-npm/scope). Examples: ```bash diff --git a/docs/content/cli-commands/npm-unpublish.md b/docs/content/cli-commands/npm-unpublish.md old mode 100755 new mode 100644 index de37f382912ea..5348023d9a840 --- a/docs/content/cli-commands/npm-unpublish.md +++ b/docs/content/cli-commands/npm-unpublish.md @@ -4,7 +4,7 @@ title: npm-unpublish description: Remove a package from the registry --- -# npm-unpublish +# npm-unpublish(1) ## Remove a package from the registry @@ -43,7 +43,7 @@ only allowed with versions published in the last 72 hours. If you are trying to unpublish a version published longer ago than that, contact support@npmjs.com. -The scope is optional and follows the usual rules for [`npm-scope`](/docs/using-npm/scope). +The scope is optional and follows the usual rules for [`scope`](/using-npm/scope). ### See Also diff --git a/docs/content/cli-commands/npm-update.md b/docs/content/cli-commands/npm-update.md old mode 100755 new mode 100644 index 2eb0235faee81..f2e93b6dc33df --- a/docs/content/cli-commands/npm-update.md +++ b/docs/content/cli-commands/npm-update.md @@ -4,7 +4,7 @@ title: npm-update description: Update a package --- -# npm-update +# npm-update(1) ## Update a package diff --git a/docs/content/cli-commands/npm-version.md b/docs/content/cli-commands/npm-version.md old mode 100755 new mode 100644 index f9e34feb995b3..a47e9e33326ac --- a/docs/content/cli-commands/npm-version.md +++ b/docs/content/cli-commands/npm-version.md @@ -4,7 +4,7 @@ title: npm-version description: Bump a package version --- -# npm-version +# npm-version(1) ## Bump a package version @@ -129,6 +129,6 @@ Note that you must have a default GPG key set up in your git config for this to * [npm init](/cli-commands/npm-init) * [npm run-script](/cli-commands/npm-run-script) * [npm scripts](/using-npm/scripts) -* [package.json](/docs/configuring-npm/package-json) +* [package.json](/configuring-npm/package-json) * [semver](/using-npm/semver) * [config](/using-npm/config) diff --git a/docs/content/cli-commands/npm-view.md b/docs/content/cli-commands/npm-view.md old mode 100755 new mode 100644 index bbea3f860c0ab..0c108e6f56615 --- a/docs/content/cli-commands/npm-view.md +++ b/docs/content/cli-commands/npm-view.md @@ -4,7 +4,7 @@ title: npm-view description: View registry info --- -# npm-view +# npm-view(1) ## View registry info @@ -80,7 +80,7 @@ npm view express contributors.name contributors.email "Person" fields are shown as a string if they would be shown as an object. So, for example, this will show the list of npm contributors in -the shortened string format. (See [`package.json`](/docs/configuring-npm/package.json) for more on this.) +the shortened string format. (See [`package.json`](/configuring-npm/package.json) for more on this.) ```bash npm view npm contributors diff --git a/docs/content/cli-commands/npm-whoami.md b/docs/content/cli-commands/npm-whoami.md old mode 100755 new mode 100644 index 2fa9441626cd5..b0eda4e46aa61 --- a/docs/content/cli-commands/npm-whoami.md +++ b/docs/content/cli-commands/npm-whoami.md @@ -4,7 +4,7 @@ title: npm-whoami description: Display npm username --- -# npm-whoami +# npm-whoami(1) ## Display npm username ### Synopsis diff --git a/docs/content/cli-commands/npm.md b/docs/content/cli-commands/npm.md old mode 100755 new mode 100644 index 55797dbdf6295..01a9308204d19 --- a/docs/content/cli-commands/npm.md +++ b/docs/content/cli-commands/npm.md @@ -4,7 +4,8 @@ title: npm description: javascript package manager --- -# npm +# npm(1) + ## javascript package manager ### Synopsis @@ -44,7 +45,7 @@ terms of use. You probably got npm because you want to install stuff. Use `npm install blerg` to install the latest version of "blerg". Check out -[`npm-install`](npm-install) for more info. It can do a lot of stuff. +[`npm install`](/cli-commands/npm-install) for more info. It can do a lot of stuff. Use the `npm search` command to show everything that's available. Use `npm ls` to show everything you've installed. @@ -67,7 +68,7 @@ the [node-gyp Wiki](https://github.com/TooTallNate/node-gyp/wiki). ### Directories -See [`npm-folders`](/docs/configuring-npm/folders) to learn about where npm puts stuff. +See [`folders`](/configuring-npm/folders) to learn about where npm puts stuff. In particular, npm has two modes of operation: @@ -88,7 +89,7 @@ If you're using npm to develop and publish your code, check out the following help topics: * json: - Make a package.json file. See [`package.json`](/docs/configuring-npm/package.json). + Make a package.json file. See [`package.json`](/configuring-npm/package.json). * link: For linking your current working code into Node's path, so that you don't have to reinstall every time you make a change. Use @@ -129,7 +130,7 @@ npm is extremely configurable. It reads its configuration options from npm's default configuration options are defined in lib/utils/config-defs.js. These must not be changed. -See [`npm-config`](/docs/using-npm/config) for much much more information. +See [`config`](/using-npm/config) for much much more information. ### Contributions @@ -139,8 +140,7 @@ If you would like to contribute, but don't know what to work on, read the contributing guidelines and check the issues list. * [CONTRIBUTING.md](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) -* [Bug tracker](https://npm.community/c/bugs) -* [Support tracker](https://npm.community/c/support) +* [Bug tracker](https://github.com/npm/cli/issues) ### Bugs diff --git a/docs/content/configuring-npm/folders.md b/docs/content/configuring-npm/folders.md old mode 100755 new mode 100644 index 913f90cbf81ff..96a8f4783d719 --- a/docs/content/configuring-npm/folders.md +++ b/docs/content/configuring-npm/folders.md @@ -4,7 +4,7 @@ title: folders description: Folder Structures Used by npm --- -# folders +# folders(5) ## Folder Structures Used by npm @@ -49,8 +49,7 @@ Global installs on Windows go to `{prefix}/node_modules` (that is, no Scoped packages are installed the same way, except they are grouped together in a sub-folder of the relevant `node_modules` folder with the name of that scope prefix by the @ symbol, e.g. `npm install @myorg/package` would place -the package in `{prefix}/node_modules/@myorg/package`. See [`scope`](/docs/using-npm/scope) for -more details. +the package in `{prefix}/node_modules/@myorg/package`. See [`scope`](/using-npm/scope) for more details. If you wish to `require()` a package, then install it locally. @@ -74,7 +73,7 @@ Man pages are not installed on Windows systems. #### Cache -See [`npm-cache`](/docs/cli-commands/npm-cache). Cache files are stored in `~/.npm` on Posix, or +See [`npm cache`](/cli-commands/npm-cache). Cache files are stored in `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows. This is controlled by the `cache` configuration param. @@ -210,7 +209,7 @@ not be included in the package tarball. This allows a package maintainer to install all of their dependencies (and dev dependencies) locally, but only re-publish those items that -cannot be found elsewhere. See [`package.json`](/docs/configuring-npm/package.json) for more information. +cannot be found elsewhere. See [`package.json`](/configuring-npm/package.json) for more information. ### See also diff --git a/docs/content/configuring-npm/install.md b/docs/content/configuring-npm/install.md index 9e4f222b40373..31a316f8e0630 100644 --- a/docs/content/configuring-npm/install.md +++ b/docs/content/configuring-npm/install.md @@ -4,7 +4,11 @@ title: install description: Download and install node and npm --- -# Download and Install npm +# install(5) + +## Download and Install npm + +### Description To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. **We strongly recommend using a Node version manager to install Node.js and npm.** We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally. diff --git a/docs/content/configuring-npm/npmrc.md b/docs/content/configuring-npm/npmrc.md old mode 100755 new mode 100644 index b1a66ce10bf97..090ed5944fcce --- a/docs/content/configuring-npm/npmrc.md +++ b/docs/content/configuring-npm/npmrc.md @@ -4,7 +4,7 @@ title: npmrc description: The npm config files --- -# npmrc +# npmrc(5) ## The npm config files @@ -16,7 +16,7 @@ variables, and `npmrc` files. The `npm config` command can be used to update and edit the contents of the user and global npmrc files. -For a list of available configuration options, see [npm-config](/docs/using-npm/config). +For a list of available configuration options, see [config](/using-npm/config). ### Files diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md old mode 100755 new mode 100644 index 6c19b94ba3515..b7759f482f914 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -4,7 +4,7 @@ title: package.json description: Specifics of npm's package.json handling --- -# package.json +# package.json(5) ## Specifics of npm's package.json handling @@ -14,7 +14,7 @@ This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a JavaScript object literal. A lot of the behavior described in this document is affected by the config -settings described in [`npm-config`](/docs/using-npm/config). +settings described in [`config`](/using-npm/config). ### name @@ -30,7 +30,7 @@ Some rules: * The name must be less than or equal to 214 characters. This includes the scope for scoped packages. -* The name can't start with a dot or an underscore. +* The names of scoped packages can begin with a dot or an underscore. This is not permitted without a scope. * New packages must not have uppercase letters in the name. * The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can't contain any non-URL-safe characters. @@ -47,7 +47,7 @@ Some tips: already, before you get too attached to it. A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See -[`npm-scope`](/docs/using-npm/scope) for more detail. +[`scope`](/using-npm/scope) for more detail. ### version @@ -61,7 +61,7 @@ Version must be parseable by [node-semver](https://github.com/isaacs/node-semver), which is bundled with npm as a dependency. (`npm install semver` to use it yourself.) -More on version numbers and ranges at [semver](/docs/using-npm/semver). +More on version numbers and ranges at [semver](/using-npm/semver). ### description @@ -469,7 +469,7 @@ The "scripts" property is a dictionary containing script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point. -See [`npm-scripts`](/docs/using-npm/scripts) to find out more about writing package scripts. +See [`scripts`](/using-npm/scripts) to find out more about writing package scripts. ### config @@ -486,7 +486,7 @@ and then had a "start" command that then referenced the `npm_package_config_port` environment variable, then the user could override that by doing `npm config set foo:port 8001`. -See [`npm-config`](/docs/using-npm/config) and [`npm-scripts`](/docs/using-npm/scripts) for more on package +See [`config`](/using-npm/config) and [`scripts`](/using-npm/scripts) for more on package configs. ### dependencies @@ -499,15 +499,15 @@ tarball or git URL. **Please do not put test harnesses or transpilers in your `dependencies` object.** See `devDependencies`, below. -See [semver](/docs/using-npm/semver) for more details about specifying version ranges. +See [semver](/using-npm/semver) for more details about specifying version ranges. * `version` Must match `version` exactly * `>version` Must be greater than `version` * `>=version` etc * `[@]:`. For example, if the package.json has this: @@ -134,7 +134,7 @@ then the user could change the behavior by doing: npm config set foo:port 80 ``` -See [package.json](/docs/configuring-npm/package-json) for more information. +See [package.json](/configuring-npm/package-json) for more information. ### Config Settings @@ -179,7 +179,7 @@ When "dev" or "development" and running local `npm shrinkwrap`, When "true" submit audit reports alongside `npm install` runs to the default registry and all registries configured for scopes. See the documentation -for [`npm-audit`](/docs/cli-commands/npm-audit) for details on what is submitted. +for [`npm audit`](/cli-commands/npm-audit) for details on what is submitted. #### audit-level @@ -270,7 +270,7 @@ well as for the CA information to be stored in a file on disk. * Default: Windows: `%AppData%\npm-cache`, Posix: `~/.npm` * Type: path -The location of npm's cache directory. See [`npm-cache`](/docs/cli-commands/npm-cache) +The location of npm's cache directory. See [`npm cache`](/cli-commands/npm-cache) #### cache-lock-stale @@ -456,7 +456,7 @@ packages. When "true" displays the message at the end of each `npm install` aknowledging the number of dependencies looking for funding. -See [`npm-fund`](/docs/cli-commands/npm-fund) for details. +See [`npm fund`](/cli-commands/npm-fund) for details. #### git @@ -488,7 +488,7 @@ Run git commit hooks when using the `npm version` command. Operates in "global" mode, so that packages are installed into the `prefix` folder instead of the current working directory. See -[npm-folders](/docs/configuring-npm/folders) for more on the differences in behavior. +[folders](/configuring-npm/folders) for more on the differences in behavior. * packages are installed into the `{prefix}/lib/node_modules` folder, instead of the current working directory. @@ -571,7 +571,7 @@ If true, npm does not run scripts specified in package.json files. A module that will be loaded by the `npm init` command. See the documentation for the [init-package-json](https://github.com/isaacs/init-package-json) module -for more information, or [npm-init](/docs/cli-commands/npm-init). +for more information, or [npm init](/cli-commands/npm-init). #### init-author-name @@ -857,7 +857,7 @@ for updates immediately even for fresh package data. #### prefix -* Default: see [npm-folders](/docs/configuring-npm/folders) +* Default: see [folders](/configuring-npm/folders) * Type: path The location to install global items. If set on the command line, then @@ -1228,7 +1228,7 @@ version of npm than the latest. * Type: Boolean Set to show short usage output (like the -H output) -instead of complete help when doing [`npm-help`](/docs/cli-commands/npm-help). +instead of complete help when doing [`npm help`](/cli-commands/npm-help). #### user diff --git a/docs/content/using-npm/developers.md b/docs/content/using-npm/developers.md old mode 100755 new mode 100644 index ed4572d478571..80b7fee6a544d --- a/docs/content/using-npm/developers.md +++ b/docs/content/using-npm/developers.md @@ -4,7 +4,7 @@ title: developers description: Developer Guide --- -# developers +# developers(7) ## Developer Guide @@ -58,7 +58,7 @@ an argument to `git checkout`. The default is `master`. You need to have a `package.json` file in the root of your project to do much of anything with npm. That is basically the whole interface. -See [`package.json`](/docs/configuring-npm/package-json) for details about what goes in that file. At the very +See [`package.json`](/configuring-npm/package-json) for details about what goes in that file. At the very least, you need: * name: @@ -87,7 +87,7 @@ least, you need: If you have a special compilation or installation script, then you should put it in the `scripts` object. You should definitely have at least a basic smoke-test command as the "scripts.test" field. - See [npm-scripts](/docs/using-npm/scripts). + See [scripts](/using-npm/scripts). * main: If you have a single module that serves as the entry point to your @@ -100,7 +100,7 @@ least, you need: they'll get installed just like these ones. You can use `npm init` in the root of your package in order to get you -started with a pretty basic package.json file. See [`npm-init`](/docs/cli-commands/npm-init) for +started with a pretty basic package.json file. See [`npm init`](/cli-commands/npm-init) for more info. ### Keeping files *out* of your package @@ -169,7 +169,7 @@ changes in real time without having to keep re-installing it. (You do need to either re-link or `npm rebuild -g` to update compiled packages, of course.) -More info at [`npm-link`](/docs/cli-commands/npm-link). +More info at [`npm link`](/cli-commands/npm-link). ### Before Publishing: Make Sure Your Package Installs and Works @@ -217,7 +217,7 @@ npm adduser and then follow the prompts. -This is documented better in [npm-adduser](/docs/cli-commands/npm-adduser). +This is documented better in [npm adduser](/cli-commands/npm-adduser). ### Publish your package diff --git a/docs/content/using-npm/disputes.md b/docs/content/using-npm/disputes.md old mode 100755 new mode 100644 index 69397164d2e46..65751618cab8a --- a/docs/content/using-npm/disputes.md +++ b/docs/content/using-npm/disputes.md @@ -4,7 +4,7 @@ title: disputes description: Handling Module Name Disputes --- -# disputes +# disputes(7) ## Handling Module Name Disputes diff --git a/docs/content/using-npm/orgs.md b/docs/content/using-npm/orgs.md old mode 100755 new mode 100644 index 8f1935dee89cc..9709a12d72675 --- a/docs/content/using-npm/orgs.md +++ b/docs/content/using-npm/orgs.md @@ -4,7 +4,7 @@ title: orgs description: Working with Teams & Orgs --- -# orgs +# orgs(7) ## Working with Teams & Orgs @@ -24,8 +24,8 @@ The developer will be able to access packages based on the teams they are on. Ac There are two main commands: -1. `npm team` see [npm-team](/docs/cli-commands/npm-team) for more details -2. `npm access` see [npm-access](/docs/cli-commands/npm-access) for more details +1. `npm team` see [npm team](/cli-commands/npm-team) for more details +2. `npm access` see [npm access](/cli-commands/npm-access) for more details ### Team Admins create teams diff --git a/docs/content/using-npm/registry.md b/docs/content/using-npm/registry.md old mode 100755 new mode 100644 index 8dbcba082bff4..cd6a2e4d71eeb --- a/docs/content/using-npm/registry.md +++ b/docs/content/using-npm/registry.md @@ -4,7 +4,7 @@ title: registry description: The JavaScript Package Registry --- -# registry +# registry(7) ## The JavaScript Package Registry @@ -32,9 +32,9 @@ of which there is a public mirror at available at . The registry URL used is determined by the scope of the package (see -[`npm-scope`](scope). If no scope is specified, the default registry is used, which is -supplied by the `registry` config parameter. See [`npm-config`](/docs/cli-commands/npm-config), -[`npmrc`](/docs/configuring-npm/npmrc), and [`npm-config`](/docs/using-npm/config) for more on managing npm's configuration. +[`scope`](/using-npm/scope). If no scope is specified, the default registry is used, which is +supplied by the `registry` config parameter. See [`npm config`](/cli-commands/npm-config), +[`npmrc`](/configuring-npm/npmrc), and [`config`](/using-npm/config) for more on managing npm's configuration. ### Does npm send any information about me back to the registry? @@ -81,7 +81,7 @@ published at all, or `"publishConfig":{"registry":"http://my-internal-registry.local"}` to force it to be published only to your internal registry. -See [`package.json`](/docs/configuring-npm/package-json) for more info on what goes in the package.json file. +See [`package.json`](/configuring-npm/package-json) for more info on what goes in the package.json file. ### Will you replicate from my registry into the public one? diff --git a/docs/content/using-npm/removal.md b/docs/content/using-npm/removal.md old mode 100755 new mode 100644 index 522ac2af53f19..7c83684673240 --- a/docs/content/using-npm/removal.md +++ b/docs/content/using-npm/removal.md @@ -4,7 +4,7 @@ title: removal description: Cleaning the Slate --- -# removal +# removal(7) ## Cleaning the Slate @@ -66,6 +66,5 @@ find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ; ### See also -* README * [npm uninstall](/cli-commands/npm-uninstall) * [npm prune](/cli-commands/npm-prune) diff --git a/docs/content/using-npm/scope.md b/docs/content/using-npm/scope.md old mode 100755 new mode 100644 index fe5d897631130..2cbc108f0db92 --- a/docs/content/using-npm/scope.md +++ b/docs/content/using-npm/scope.md @@ -3,7 +3,7 @@ section: using-npm title: scope description: Scoped packages --- -# scope +# scope(7) ## Scoped packages @@ -55,7 +55,7 @@ Or in `package.json`: ``` Note that if the `@` symbol is omitted, in either case, npm will instead attempt to -install from GitHub; see [`npm-install`](/docs/cli-commands/npm-install). +install from GitHub; see [`npm install`](/cli-commands/npm-install). ### Requiring scoped packages diff --git a/docs/content/using-npm/scripts.md b/docs/content/using-npm/scripts.md old mode 100755 new mode 100644 index 4894d71b5bc59..6a2522fba43a7 --- a/docs/content/using-npm/scripts.md +++ b/docs/content/using-npm/scripts.md @@ -4,7 +4,7 @@ title: scripts description: How npm handles the "scripts" field --- -# scripts +# scripts(7) ## How npm handles the "scripts" field @@ -13,7 +13,7 @@ description: How npm handles the "scripts" field npm supports the "scripts" property of the package.json file, for the following scripts: -* **prepublish**: +* **prepublish** (_as of npm@5, `prepublish` is deprecated. Use `prepare` for build steps and `prepublishOnly` for upload-only._): Run BEFORE the package is packed and published, as well as on local `npm install` without any arguments. (See below) * **prepare**: @@ -265,7 +265,7 @@ above. only will prevent some optional features, then it's better to just print a warning and exit successfully. * Try not to use scripts to do what npm can do for you. Read through - [`package.json`](/docs/configuring-npm/package-json) to see all the things that you can specify and enable + [`package.json`](/configuring-npm/package-json) to see all the things that you can specify and enable by simply describing your package appropriately. In general, this will lead to a more robust and consistent state. * Inspect the env to determine where to put things. For instance, if diff --git a/docs/content/using-npm/semver.md b/docs/content/using-npm/semver.md old mode 100755 new mode 100644 diff --git a/docs/gatsby-browser.js b/docs/gatsby-browser.js index 035a4dc0398b8..b1425d1fb58cf 100644 --- a/docs/gatsby-browser.js +++ b/docs/gatsby-browser.js @@ -1,10 +1,8 @@ +import React from 'react' +import Layout from './src/components/layout' require('prismjs/themes/prism-tomorrow.css') require('./src/main.css') -/** - * Implement Gatsby's Browser APIs in this file. - * - * See: https://www.gatsbyjs.org/docs/browser-apis/ - */ - -// You can delete this file if you're not using it +export const wrapPageElement = ({ element, props }) => { + return {element} +} diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js index b899bb0c5ae0e..f44e1bc4edec4 100644 --- a/docs/gatsby-config.js +++ b/docs/gatsby-config.js @@ -1,5 +1,6 @@ -module.exports = { - pathPrefix: `${__dirname}/public`, +const IS_STATIC = process.env.GATSBY_IS_STATIC + +const OPTS = { siteMetadata: { title: 'npm cli documentation', description: 'Documentation for the npm cli.', @@ -86,3 +87,10 @@ module.exports = { } ] } + +const STATIC_OPTS = Object.assign({}, OPTS, { + pathPrefix: '__GATSBY_IPFS_PATH_PREFIX__', + plugins: OPTS.plugins.concat(['gatsby-plugin-ipfs']) +}) + +module.exports = IS_STATIC ? STATIC_OPTS : OPTS diff --git a/docs/gatsby-ssr.js b/docs/gatsby-ssr.js new file mode 100644 index 0000000000000..33361c0a38ca7 --- /dev/null +++ b/docs/gatsby-ssr.js @@ -0,0 +1,6 @@ +import React from 'react' +import Layout from './src/components/layout' + +export const wrapPageElement = ({ element, props }) => { + return {element} +} diff --git a/docs/package-lock.json b/docs/package-lock.json index 7027cdd66d5a9..7fbff27b294df 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -7583,6 +7583,47 @@ } } }, + "gatsby-plugin-ipfs": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/gatsby-plugin-ipfs/-/gatsby-plugin-ipfs-2.0.2.tgz", + "integrity": "sha512-Igh4K0axPzfvmP8T0w5Vvo789HTaaC0XHTkHG18jTkwW04J5TV+YPULCxVqRRCGL4cEJgpLuX9TR9iCgEu5igA==", + "requires": { + "globby": "^8.0.1", + "is-text-path": "^1.0.1", + "p-map": "^2.0.0" + }, + "dependencies": { + "globby": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", + "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", + "requires": { + "array-union": "^1.0.1", + "dir-glob": "2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" + }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, "gatsby-plugin-manifest": { "version": "2.2.6", "resolved": "https://registry.npmjs.org/gatsby-plugin-manifest/-/gatsby-plugin-manifest-2.2.6.tgz", @@ -9967,6 +10008,14 @@ "has-symbols": "^1.0.0" } }, + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "requires": { + "text-extensions": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -15763,6 +15812,11 @@ } } }, + "text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==" + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", diff --git a/docs/package.json b/docs/package.json index 1cd5209d64bbc..cc009c53b8a3e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -14,6 +14,7 @@ "gatsby": "^2.13.73", "gatsby-image": "^2.2.10", "gatsby-plugin-catch-links": "^2.1.9", + "gatsby-plugin-ipfs": "^2.0.2", "gatsby-plugin-manifest": "^2.2.6", "gatsby-plugin-no-sourcemaps": "^2.1.1", "gatsby-plugin-offline": "^2.2.7", diff --git a/docs/src/components/DocLinks.js b/docs/src/components/DocLinks.js index 27c85582e13bf..f3f5ef6484e95 100644 --- a/docs/src/components/DocLinks.js +++ b/docs/src/components/DocLinks.js @@ -5,8 +5,6 @@ import {Flex} from 'rebass' import {SidebarLink} from './links' import Accordion from './Accordion' -const IS_STATIC = process.env.GATSBY_IS_STATIC - const LinkDesc = styled.span` font-size: 11px; line-height: 1.5; @@ -37,7 +35,7 @@ const DocLinks = ({data}) => { return ( {title} diff --git a/docs/src/components/FoundTypo.js b/docs/src/components/FoundTypo.js index b92f9a09cfd54..5aca0894934dc 100644 --- a/docs/src/components/FoundTypo.js +++ b/docs/src/components/FoundTypo.js @@ -10,7 +10,7 @@ const Container = styled.div` const FoundTypo = () => { return ( -

👀 Found a typo? Let us know!

+

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, please post here. diff --git a/docs/src/components/Sidebar.js b/docs/src/components/Sidebar.js index 582f51fbc8363..3141cb0fa0fa8 100644 --- a/docs/src/components/Sidebar.js +++ b/docs/src/components/Sidebar.js @@ -21,7 +21,7 @@ const Container = styled.nav` const Sidebar = () => { return ( - + ) diff --git a/docs/src/components/home/DarkBlock.js b/docs/src/components/home/DarkBlock.js index ebe77533141c1..bba6a9fc51b3d 100644 --- a/docs/src/components/home/DarkBlock.js +++ b/docs/src/components/home/DarkBlock.js @@ -30,7 +30,6 @@ const DarkBlock = () => {

The current stable version of npm is available on GitHub.

To upgrade, run: npm install npm@latest -g

-

To report bugs or submit feature requests, please XXX.

read docs diff --git a/docs/src/components/home/Features.js b/docs/src/components/home/Features.js index 0aac994bee029..e544b4ac9de41 100644 --- a/docs/src/components/home/Features.js +++ b/docs/src/components/home/Features.js @@ -60,7 +60,7 @@ const Features = () => { text={featureTexts.textTwo} /> - + { + const showSidebar = IS_STATIC || path.match(/cli-commands|configuring-npm|using-npm/) -const Layout = ({children, showSidebar}) => { return ( - + {showSidebar && } {children} - + ) } diff --git a/docs/src/components/scripts.js b/docs/src/components/scripts.js index 54ad165400448..75126e11ffaf8 100644 --- a/docs/src/components/scripts.js +++ b/docs/src/components/scripts.js @@ -3,14 +3,18 @@ import React from 'react' const IS_STATIC = process.env.GATSBY_IS_STATIC const Scripts = () => { + // Workaround: Make links work on the static html site if (IS_STATIC) { return (