From d9e6120d55fc72a80fd4abddee2f1cc095401d28 Mon Sep 17 00:00:00 2001 From: claudiahdz Date: Wed, 6 Nov 2019 20:06:36 +0200 Subject: [PATCH 01/10] chore(docs): fix links on markdowns chore(docs): fix styling issues on man and html docs chore(docs): fix absolute links on cli docs --- docs/content/cli-commands/npm-access.md | 2 +- docs/content/cli-commands/npm-adduser.md | 12 ++--- docs/content/cli-commands/npm-audit.md | 2 +- docs/content/cli-commands/npm-bin.md | 2 +- docs/content/cli-commands/npm-bugs.md | 2 +- docs/content/cli-commands/npm-build.md | 2 +- docs/content/cli-commands/npm-bundle.md | 2 +- docs/content/cli-commands/npm-cache.md | 2 +- docs/content/cli-commands/npm-ci.md | 4 +- docs/content/cli-commands/npm-completion.md | 2 +- docs/content/cli-commands/npm-config.md | 6 +-- docs/content/cli-commands/npm-dedupe.md | 4 +- docs/content/cli-commands/npm-deprecate.md | 2 +- docs/content/cli-commands/npm-dist-tag.md | 2 +- docs/content/cli-commands/npm-docs.md | 3 +- docs/content/cli-commands/npm-doctor.md | 2 +- docs/content/cli-commands/npm-edit.md | 2 +- docs/content/cli-commands/npm-explore.md | 4 +- docs/content/cli-commands/npm-fund.md | 10 ++-- docs/content/cli-commands/npm-help-search.md | 2 +- docs/content/cli-commands/npm-help.md | 2 +- docs/content/cli-commands/npm-hook.md | 5 +- docs/content/cli-commands/npm-init.md | 2 +- .../cli-commands/npm-install-ci-test.md | 2 +- docs/content/cli-commands/npm-install-test.md | 2 +- docs/content/cli-commands/npm-install.md | 27 +++++----- docs/content/cli-commands/npm-link.md | 7 ++- docs/content/cli-commands/npm-logout.md | 4 +- docs/content/cli-commands/npm-ls.md | 2 +- docs/content/cli-commands/npm-org.md | 2 +- docs/content/cli-commands/npm-outdated.md | 2 +- docs/content/cli-commands/npm-owner.md | 2 +- docs/content/cli-commands/npm-pack.md | 2 +- docs/content/cli-commands/npm-ping.md | 2 +- docs/content/cli-commands/npm-prefix.md | 4 +- docs/content/cli-commands/npm-profile.md | 2 +- docs/content/cli-commands/npm-prune.md | 2 +- docs/content/cli-commands/npm-publish.md | 12 ++--- docs/content/cli-commands/npm-rebuild.md | 6 +-- docs/content/cli-commands/npm-repo.md | 2 +- docs/content/cli-commands/npm-restart.md | 4 +- docs/content/cli-commands/npm-root.md | 2 +- docs/content/cli-commands/npm-run-script.md | 2 +- docs/content/cli-commands/npm-search.md | 2 +- docs/content/cli-commands/npm-shrinkwrap.md | 4 +- docs/content/cli-commands/npm-star.md | 2 +- docs/content/cli-commands/npm-stars.md | 2 +- docs/content/cli-commands/npm-start.md | 5 +- docs/content/cli-commands/npm-stop.md | 2 +- docs/content/cli-commands/npm-team.md | 5 +- docs/content/cli-commands/npm-test.md | 2 +- docs/content/cli-commands/npm-token.md | 2 +- docs/content/cli-commands/npm-uninstall.md | 4 +- docs/content/cli-commands/npm-unpublish.md | 4 +- docs/content/cli-commands/npm-update.md | 2 +- docs/content/cli-commands/npm-version.md | 4 +- docs/content/cli-commands/npm-view.md | 4 +- docs/content/cli-commands/npm-whoami.md | 2 +- docs/content/cli-commands/npm.md | 14 ++--- docs/content/configuring-npm/folders.md | 9 ++-- docs/content/configuring-npm/install.md | 6 ++- docs/content/configuring-npm/npmrc.md | 4 +- docs/content/configuring-npm/package-json.md | 24 ++++----- .../configuring-npm/package-lock-json.md | 4 +- docs/content/configuring-npm/package-locks.md | 9 ++-- .../configuring-npm/shrinkwrap-json.md | 6 +-- docs/content/using-npm/coding-style.md | 4 +- docs/content/using-npm/config.md | 24 ++++----- docs/content/using-npm/developers.md | 12 ++--- docs/content/using-npm/disputes.md | 2 +- docs/content/using-npm/orgs.md | 6 +-- docs/content/using-npm/registry.md | 10 ++-- docs/content/using-npm/removal.md | 3 +- docs/content/using-npm/scope.md | 4 +- docs/content/using-npm/scripts.md | 4 +- docs/gatsby-config.js | 12 ++++- docs/package-lock.json | 54 +++++++++++++++++++ docs/package.json | 1 + docs/src/components/DocLinks.js | 4 +- docs/src/components/Sidebar.js | 2 +- docs/src/components/scripts.js | 8 ++- docs/src/templates/Page.js | 8 +-- scripts/docs-build.js | 14 ++--- 83 files changed, 259 insertions(+), 203 deletions(-) diff --git a/docs/content/cli-commands/npm-access.md b/docs/content/cli-commands/npm-access.md index f2411af26e761..0fbce9c0759d1 100755 --- 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 index 0a549005f1e3a..2df35e45fc550 100755 --- 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 index 22b238a1f7159..0aba874f96df8 100755 --- 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 index b612ea3cfe8c3..6c7ce0eee54e2 100755 --- 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 index 46a3505808deb..dcc9c358df14d 100755 --- 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 index 7d599b0a4b06d..b657129787663 100755 --- 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 index 8de9dc15c2d61..76417ac8b0b0c 100755 --- 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 index 143cd9285b881..ed31a320421b0 100755 --- 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 index 88d12a7e6aa15..357ba16cf6ade 100755 --- 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 index 87685966df016..59bfca503e084 100755 --- 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 index 7082603d11a7b..c2f2033b066d2 100755 --- 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 index a4abf53dff107..e15a12ba7c18a 100755 --- 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 index 29fcd62cdacd0..d2d9613f653c6 100755 --- 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 index 501975dc50e99..c7921c7f739d7 100755 --- 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 index b53cc5740e60f..46f5cd0d900a4 100755 --- 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 index 12f7e2b66e753..7cec349e5a814 100755 --- 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 index fe62e34cbe8fc..94b6a087fa102 100755 --- 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 index e690e57544e8a..8ded96d40984f 100755 --- 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 index be5ba1410e735..69d005cb160ed 100755 --- 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 index c5fbbe78c4012..c47676ffcac1d 100755 --- 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 index db935be301684..ce4bbccb3593b 100755 --- 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 index 10938aa7011fd..73ad74b23ea99 100755 --- 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 index 46cab812cbe98..98e40f4b27a77 100755 --- 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 index 69912084c1be3..b86a5199117c4 100755 --- 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 index 523fd68f96a49..89ac14cd88e07 100755 --- 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 @@ -31,15 +31,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 [`npm-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,7 +58,7 @@ 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 @@ -102,7 +102,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. @@ -138,7 +138,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 +188,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. @@ -362,7 +362,7 @@ install that aknowledges 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 +371,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 +402,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 +450,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 index c93b9177cccde..5c417dd143778 100755 --- 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 index 7a5cf047034bf..ca7d86f2d1960 100755 --- 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 index 703b319b40dae..64a399155ff60 100755 --- 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 index 3dca586670e5d..33db38d0f82a5 100755 --- 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 index 44ec0b3cf2485..c7934109dca37 100755 --- 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 index 7c803b915dd47..bc2fbc82fb280 100755 --- 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 index 70caa02d2b439..acf18559c14e0 100755 --- 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 index 468734bd1f0d2..93d18b57f840b 100755 --- 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 index f2fd3e4f19d4f..b82fec663a147 100755 --- 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 index 1f3b146b8ad4c..9fe82cd2d3a95 100755 --- 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 index 93c7efe8d4394..c6b61e62f828a 100755 --- 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 index 698aad87a2449..b9d0cf1449e76 100755 --- 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 index 8ec9c0302de65..414b9ca55a193 100755 --- 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 index bcebecb69064c..ad41ea571253f 100755 --- 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 index ba4e589b7ac51..d6d388b224ab1 100755 --- 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 index d654f1c58b42b..2b27878af4c6d 100755 --- 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 index 9d71616ab8ee1..51def74c3c4c3 100755 --- 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 index 76735e941bd72..e066106faf71f 100755 --- 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 index 147ffe393749e..342fb001675ab 100755 --- 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 index 77841e03038f1..1912e9c654bc2 100755 --- 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 index 7dbb9ece8acd5..475547bb4b7f2 100755 --- 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 index fdbae4b103e09..839528257b6d9 100755 --- 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 index 62d6478f2e68c..da759047cb19a 100755 --- 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 index 3401dae26b369..0f463f2985419 100755 --- 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 @@ -29,8 +29,7 @@ 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. +`developers` team on a `foo` organization, you must always refer to that team as `foo:developers` in these commands. * create / destroy: Create a new team, or destroy an existing one. diff --git a/docs/content/cli-commands/npm-test.md b/docs/content/cli-commands/npm-test.md index af393ae99e333..99c027e3e057a 100755 --- 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 index c94fb1819f8b8..37a74083d2a12 100755 --- 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 index 932e1015c92d7..96fdc4ebe05ba 100755 --- 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 index de37f382912ea..5348023d9a840 100755 --- 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 index 2eb0235faee81..f2e93b6dc33df 100755 --- 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 index f9e34feb995b3..a47e9e33326ac 100755 --- 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 index bbea3f860c0ab..0c108e6f56615 100755 --- 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 index 2fa9441626cd5..b0eda4e46aa61 100755 --- 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 index 55797dbdf6295..01a9308204d19 100755 --- 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 index 913f90cbf81ff..96a8f4783d719 100755 --- 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 index b1a66ce10bf97..090ed5944fcce 100755 --- 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 index 6c19b94ba3515..ba9db154c7a66 100755 --- 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 @@ -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 index ed4572d478571..80b7fee6a544d 100755 --- 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 index 69397164d2e46..65751618cab8a 100755 --- 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 index 8f1935dee89cc..9709a12d72675 100755 --- 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 index 8dbcba082bff4..cd6a2e4d71eeb 100755 --- 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 index 522ac2af53f19..7c83684673240 100755 --- 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 index fe5d897631130..2cbc108f0db92 100755 --- 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 index 4894d71b5bc59..a962d73c5ed1c 100755 --- 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 @@ -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/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/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/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/scripts.js b/docs/src/components/scripts.js index 54ad165400448..4d4a9a0fa9049 100644 --- a/docs/src/components/scripts.js +++ b/docs/src/components/scripts.js @@ -9,8 +9,12 @@ const Scripts = () => { dangerouslySetInnerHTML={{ __html: ` // Workaround: Make links on our Markdown files work on the static site - var anchors = document.querySelectorAll("#see-also + ul li a") - Array.prototype.slice.call(anchors).map(function(el) { el.href = el + "/index.html" }) + var anchors = document.querySelectorAll(".sidebar a, .documentation a") + Array.prototype.slice.call(anchors).map(function(el) { + if (el.href.match(/file:\\/\\//)) { + el.href = el.href + "/index.html" + } + }) ` }} /> diff --git a/docs/src/templates/Page.js b/docs/src/templates/Page.js index bd7d6a01ca3b3..0ffb6eeec13df 100644 --- a/docs/src/templates/Page.js +++ b/docs/src/templates/Page.js @@ -15,15 +15,15 @@ const Content = styled.div` const Page = ({data}) => { const pageData = data.markdownRemark - const html = pageData.html.replace(/(npm-)+([a-zA-Z\\.-]*)<\/h1>/g, 'npm $2') + const html = pageData.html.replace(/@VERSION@/g, version) + .replace(/(npm-)+([a-zA-Z\\.-]*)(\((1|5|7)\))<\/h1>/, 'npm $2') + .replace(/([a-zA-Z\\.-]*)(\((1|5|7)\))<\/h1>/, '$1') return ( -
+
diff --git a/scripts/docs-build.js b/scripts/docs-build.js index f6b87ae9d0445..e3cd2e9826f1e 100644 --- a/scripts/docs-build.js +++ b/scripts/docs-build.js @@ -10,14 +10,16 @@ var dest = args[1] || src fs.readFile(src, 'utf8', function (err, data) { if (err) return console.log(err) + function replacer (match, p1) { + return 'npm help ' + p1.replace(/npm /, '') + } + var result = data.replace(/@VERSION@/g, npm.version) .replace(/---([\s\S]+)---/g, '') - .replace(/(npm-)?([a-zA-Z\\.-]*)\(1\)/g, 'npm help $2') - .replace(/(npm-)?([a-zA-Z\\.-]*)\((5|7)\)/g, 'npm help $2') - .replace(/npm(1)/g, 'npm help npm') - .replace(/\[([^\]]+)\]\(\/cli-commands\/([^)]+)\)/g, 'npm help $2') - .replace(/\[([^\]]+)\]\(\/configuring-npm\/([^)]+)\)/g, 'npm help $2') - .replace(/\[([^\]]+)\]\(\/using-npm\/([^)]+)\)/g, 'npm help $2') + .replace(/\[([^\]]+)\]\(\/cli-commands\/([^)]+)\)/g, replacer) + .replace(/\[([^\]]+)\]\(\/configuring-npm\/([^)]+)\)/g, replacer) + .replace(/\[([^\]]+)\]\(\/using-npm\/([^)]+)\)/g, replacer) + .replace(/(# .*)\s+(## (.*))/g, '$1 - $3') .trim() fs.writeFile(dest, marked(result), 'utf8', function (err) { From 5953e6d117a175d25d9132a924071434bdfedade Mon Sep 17 00:00:00 2001 From: claudiahdz Date: Thu, 7 Nov 2019 20:14:47 +0200 Subject: [PATCH 02/10] feat(docs): add UI state to docs website --- docs/gatsby-browser.js | 12 +++++------- docs/gatsby-ssr.js | 6 ++++++ docs/src/components/FoundTypo.js | 2 +- docs/src/components/home/DarkBlock.js | 1 - docs/src/components/home/Terminal.js | 2 +- docs/src/components/layout.js | 12 +++++++++--- docs/src/pages/404.js | 17 +++++------------ docs/src/pages/index.js | 19 ++++++------------- docs/src/templates/Page.js | 18 ++++++------------ 9 files changed, 39 insertions(+), 50 deletions(-) create mode 100644 docs/gatsby-ssr.js 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-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/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/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/Terminal.js b/docs/src/components/home/Terminal.js index 20ebb0f73d455..19d890cb98057 100644 --- a/docs/src/components/home/Terminal.js +++ b/docs/src/components/home/Terminal.js @@ -78,7 +78,7 @@ const Bracket = styled.span` margin-top: 10px; ` -const Text = styled.strong` +const Text = styled.span` font-size: 15px; font-weight: 400; letter-spacing: 1px; diff --git a/docs/src/components/layout.js b/docs/src/components/layout.js index 5fab7b22a7dbc..cc6caa3ef6005 100644 --- a/docs/src/components/layout.js +++ b/docs/src/components/layout.js @@ -2,16 +2,22 @@ import React from 'react' import Navbar from './Navbar' import Sidebar from './Sidebar' import {Flex, Box} from 'rebass' +import { theme } from 'src/theme' +import { ThemeProvider } from 'styled-components' + +const IS_STATIC = process.env.GATSBY_IS_STATIC + +const Layout = ({children, path}) => { + const showSidebar = IS_STATIC || path.match(/cli-commands|configuring-npm|using-npm/) -const Layout = ({children, showSidebar}) => { return ( - + {showSidebar && } {children} - + ) } diff --git a/docs/src/pages/404.js b/docs/src/pages/404.js index 5acc8fedb2fc3..aa06a9d10cb9d 100644 --- a/docs/src/pages/404.js +++ b/docs/src/pages/404.js @@ -1,19 +1,12 @@ import React from 'react' - -import Layout from 'src/components/Layout' import SEO from 'src/components/seo' -import {ThemeProvider} from 'styled-components' -import {theme} from 'src/theme' - const NotFoundPage = () => ( - - - -

NOT FOUND

-

You just hit a route that doesn't exist... the sadness.

-
-
+ + +

NOT FOUND

+

You just hit a route that doesn't exist... the sadness.

+
) export default NotFoundPage diff --git a/docs/src/pages/index.js b/docs/src/pages/index.js index 992aee5f06534..6e59f79b2e645 100644 --- a/docs/src/pages/index.js +++ b/docs/src/pages/index.js @@ -1,23 +1,16 @@ import React from 'react' -import Layout from 'src/components/Layout' import Features from 'src/components/home/Features' import SEO from 'src/components/seo' import Hero from 'src/components/home/Hero' import DarkBlock from 'src/components/home/DarkBlock' -import Footer from 'src/components/home/footer' -import {ThemeProvider} from 'styled-components' -import {theme} from 'src/theme' const IndexPage = () => ( - - - - - - -