Skip to content

Commit

Permalink
fix(docs): Remove --save from install prompts (#26985)
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrosse91 committed Sep 23, 2020
1 parent 1b87ef6 commit 699c526
Show file tree
Hide file tree
Showing 60 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion docs/docs/add-a-manifest-file.md
Expand Up @@ -21,7 +21,7 @@ Quoting [Google](https://developers.google.com/web/fundamentals/web-app-manifest
1. Install the plugin:

```shell
npm install --save gatsby-plugin-manifest
npm install gatsby-plugin-manifest
```

2. Add a favicon for your app under `src/images/icon.png`. The icon is necessary to build all images for the manifest. For more information look at the docs of [`gatsby-plugin-manifest`](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-manifest/README.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/add-a-service-worker.md
Expand Up @@ -16,7 +16,7 @@ You can use this plugin together with the [manifest plugin](https://www.npmjs.co

## Installing `gatsby-plugin-offline`

`npm install --save gatsby-plugin-offline`
`npm install gatsby-plugin-offline`

Add this plugin to your `gatsby-config.js`

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/add-offline-support-with-a-service-worker.md
Expand Up @@ -21,7 +21,7 @@ We recommend using this plugin together with the [manifest plugin](https://www.n

## Installing `gatsby-plugin-offline`

`npm install --save gatsby-plugin-offline`
`npm install gatsby-plugin-offline`

Add this plugin to your `gatsby-config.js`

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/add-page-metadata.md
Expand Up @@ -15,7 +15,7 @@ Gatsby's [react helmet plugin](/packages/gatsby-plugin-react-helmet/) provides d
1. Install both packages:

```shell
npm install --save gatsby-plugin-react-helmet react-helmet
npm install gatsby-plugin-react-helmet react-helmet
```

2. Add the plugin to the `plugins` array in your `gatsby-config.js` file.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adding-an-rss-feed.md
Expand Up @@ -13,7 +13,7 @@ Think of it as a syndicated distribution channel for your site's content.
To generate an RSS feed, you can use the [`gatsby-plugin-feed`](/packages/gatsby-plugin-feed/) package. To install this package, run the following command:

```shell
npm install --save gatsby-plugin-feed
npm install gatsby-plugin-feed
```

## How to use [gatsby-plugin-feed](/packages/gatsby-plugin-feed/)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adding-analytics.md
Expand Up @@ -33,7 +33,7 @@ Now, it's time to configure Gatsby to send page views to your Google Analytics a
We are going to use `gatsby-plugin-google-analytics`. For other analytics options (including Google Analytics gtag.js and Google Tag Manager), check [other Gatsby analytics plugins](#other-gatsby-analytics-plugins).

```shell
npm install --save gatsby-plugin-google-analytics
npm install gatsby-plugin-google-analytics
```

```js:title=gatsby-config.js
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/adding-markdown-pages.md
Expand Up @@ -19,7 +19,7 @@ Use the plugin [`gatsby-source-filesystem`](/packages/gatsby-source-filesystem/#

### Install

`npm install --save gatsby-source-filesystem`
`npm install gatsby-source-filesystem`

### Add plugin

Expand Down Expand Up @@ -47,7 +47,7 @@ You'll use the plugin [`gatsby-transformer-remark`](/packages/gatsby-transformer

### Install transformer plugin

`npm install --save gatsby-transformer-remark`
`npm install gatsby-transformer-remark`

### Configure plugin

Expand Down
Expand Up @@ -17,7 +17,7 @@ For other page transition options, see the [overview on adding page animations](
First, install the plugin:

```shell
npm install --save gatsby-plugin-transition-link
npm install gatsby-plugin-transition-link
```

Make sure to add the plugin to your `gatsby-config.js`:
Expand All @@ -43,7 +43,7 @@ You can use the `AniLink` component to add page transitions without having to de
To use AniLink, you will need to install the `gsap` animation library:
```shell
npm install --save gsap
npm install gsap
```
Then, import the AniLink component:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adding-search-with-js-search.md
Expand Up @@ -25,7 +25,7 @@ After the process is complete, some additional packages are needed.
Change directories to the `js-search-example` folder and issue the following command:

```shell
npm install --save js-search axios
npm install js-search axios
```

Or if Yarn is being used:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/building-an-ecommerce-site-with-shopify.md
Expand Up @@ -20,7 +20,7 @@ If you are already comfortable with Gatsby and Shopify, you might want to check
2. Install the [`gatsby-source-shopify`](/packages/gatsby-source-shopify/) plugin and [`shopify-buy`](https://github.com/Shopify/js-buy-sdk) package.

```shell
npm install --save gatsby-source-shopify shopify-buy
npm install gatsby-source-shopify shopify-buy
```

3. Enable and configure the plugin in your `gatsby-config.js` file, replacing [some-shop] with your shop name and [token] with your Storefront access token.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/creating-a-sitemap.md
Expand Up @@ -13,7 +13,7 @@ Think of it as a map for your website. It shows what all of the pages are on you
To generate an XML sitemap, you will use the [`gatsby-plugin-sitemap`](/packages/gatsby-plugin-sitemap/) package.

Install the package by running the following command:
`npm install --save gatsby-plugin-sitemap`
`npm install gatsby-plugin-sitemap`

### How to configure

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/creating-a-transformer-plugin.md
Expand Up @@ -107,7 +107,7 @@ Now, transform the newly created `File` nodes by hooking into the `onCreateNode`
If you're following along in an example project, install the following packages:

```shell
npm install --save js-yaml lodash
npm install js-yaml lodash
```

Now, in `gatsby-node.js`:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/creating-slugs-for-pages.md
Expand Up @@ -6,7 +6,7 @@ The logic for creating slugs from file names can get tricky, the `gatsby-source-

## Install

`npm install --save gatsby-source-filesystem`
`npm install gatsby-source-filesystem`

## Create slugs in gatsby-node.js

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/data-fetching.md
Expand Up @@ -32,7 +32,7 @@ In order to fetch data at build time, you can use a source plugin or source data
To source data using an existing source plugin you need to install a plugin and add it to your [config](/docs/api-files-gatsby-config/). To use `gatsby-source-graphql`, first install it:

```shell
npm install --save gatsby-source-graphql
npm install gatsby-source-graphql
```

Then, add the plugin to your `gatsby-config`:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/emotion.md
Expand Up @@ -17,7 +17,7 @@ gatsby new emotion-tutorial https://github.com/gatsbyjs/gatsby-starter-hello-wor
Second, install the necessary dependencies for Emotion and Gatsby.

```shell
npm install --save gatsby-plugin-emotion @emotion/core @emotion/styled
npm install gatsby-plugin-emotion @emotion/core @emotion/styled
```

And then add the plugin to your site's `gatsby-config.js`:
Expand Down Expand Up @@ -123,7 +123,7 @@ To start, create a new Gatsby site with the [hello world starter](https://github
```shell
gatsby new global-styles https://github.com/gatsbyjs/gatsby-starter-hello-world
cd global-styles
npm install --save gatsby-plugin-emotion @emotion/core @emotion/styled
npm install gatsby-plugin-emotion @emotion/core @emotion/styled
```

Create `gatsby-config.js` and add the Emotion plugin:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/gatsby-image.md
Expand Up @@ -15,7 +15,7 @@ To start working with Gatsby Image, install the `gatsby-image` package along wit
A common way to source images is to install and use `gatsby-source-filesystem` to connect your local files, but other source plugins can be used as well, such as `gatsby-source-contentful`, `gatsby-source-datocms` and `gatsby-source-sanity`.

```shell
npm install --save gatsby-image gatsby-plugin-sharp gatsby-transformer-sharp
npm install gatsby-image gatsby-plugin-sharp gatsby-transformer-sharp
```

```js:title=gatsby-config.js
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/glossary/decoupled-drupal.md
Expand Up @@ -23,7 +23,7 @@ A decoupled Drupal architecture offers two key advantages over a tightly coupled
To use Drupal as a content source for Gatsby, add the [`gatsby-source-drupal`](/packages/gatsby-source-drupal/) plugin to your project. As with Gatsby itself, you install the `gatsby-source-drupal` plugin using [npm](/docs/glossary/#npm).

```shell
npm install --save gatsby-source-drupal
npm install gatsby-source-drupal
```

A decoupled Drupal architecture lets you use the full power of Drupal's content management tools while gaining the performance advantages of a static Gatsby site.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/glossary/headless-wordpress.md
Expand Up @@ -18,7 +18,7 @@ The WordPress REST API, on the other hand, returns JSON instead of HTML. Using a
Gatsby [supports WordPress](/docs/sourcing-from-wordpress/) as a content source with the [`gatsby-source-wordpress`](/packages/gatsby-source-wordpress/) plugin. As with Gatsby, you can install the `gatsby-source-wordpress` plugin using [npm](/docs/glossary/#npm):

```shell
npm install --save gatsby-source-wordpress
npm install gatsby-source-wordpress
```

The `gatsby-source-wordpress` plugin works with self-hosted WordPress sites, and those hosted by WordPress.com. Be aware, however, that the WordPress.com API supports a smaller set of features than that of self-hosted WordPress sites. It's also compatible with the [Advanced Custom Fields](https://www.advancedcustomfields.com/) plugin.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/glossary/markdown.md
Expand Up @@ -50,7 +50,7 @@ When converted to HTML, the preceding Markdown will become the markup below.
You can use Markdown files as a content source for your Gatsby site. To do so, you'll need to install two plugins: [`gatsby-source-filesystem`](/packages/gatsby-source-filesystem) and [`gatsby-transformer-remark`](/packages/gatsby-transformer-remark/). As with Gatsby itself, you can install both using [npm](/docs/glossary/#npm).

```shell
npm install --save gatsby-source-filesystem gatsby-transformer-remark
npm install gatsby-source-filesystem gatsby-transformer-remark
```

The `gatsby-source-filesystem` plugin reads files from your computer. The `gatsby-transformer-remark` plugin makes the contents of your Markdown files available to GraphQL.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/glossary/mdx.md
Expand Up @@ -56,7 +56,7 @@ gatsby new my-mdx-starter https://github.com/ChristopherBiscardi/gatsby-starter-
To use MDX with an existing Gatsby site, add the [`gatsby-plugin-mdx`](/packages/gatsby-plugin-mdx/?=gatsby-plugin-mdx) plugin. As with Gatsby itself, you can install it using [npm](/docs/glossary/#npm). You'll also need to install MDX itself, and the React implementation of MDX.

```shell
npm install --save gatsby-plugin-mdx @mdx-js/mdx @mdx-js/react
npm install gatsby-plugin-mdx @mdx-js/mdx @mdx-js/react
```

Then add `gatsby-plugin-mdx` to your plugins list in `gatsby-config.js`, and set the [configuration options](/packages/gatsby-plugin-mdx/?=gatsby-plugin-mdx#configuration) you prefer.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/glossary/wpgraphql.md
Expand Up @@ -42,7 +42,7 @@ You'll need to do two more things before you can use your WordPress-backed Graph
Use [npm](/docs/glossary#npm) to install [gatsby-source-graphql](/docs/third-party-graphql/).

```shell
npm install --save gatsby-source-graphql
npm install gatsby-source-graphql
```

Then update `gatsby-config.js`. Add the plugin to your Gatsby instance. Specify the URL of the GraphQL endpoint and set other [configuration options](/packages/gatsby-source-graphql/).
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/migrating-from-v0-to-v1.md
Expand Up @@ -27,7 +27,7 @@ git mv utils src
automatically prefixes urls and handles prefetching. Add `gatsby-link` to your
project by running:

`npm install --save gatsby-link`
`npm install gatsby-link`

`gatsby-link` auto-detects whether to use a plain `<Link>` or `<NavLink>` based
on what props you pass it. There's no need to wrap `<IndexLink>` because it was
Expand Down Expand Up @@ -123,7 +123,7 @@ Here's an example of migrating a markdown wrapper to Gatsby v1.

Install Gatsby plugins for handling markdown files.

`npm install --save gatsby-source-filesystem@next gatsby-transformer-remark@next gatsby-remark-copy-linked-files@next gatsby-remark-prismjs@next gatsby-remark-responsive-iframe@next gatsby-remark-images@next gatsby-remark-smartypants@next gatsby-plugin-sharp@next`
`npm install gatsby-source-filesystem@next gatsby-transformer-remark@next gatsby-remark-copy-linked-files@next gatsby-remark-prismjs@next gatsby-remark-responsive-iframe@next gatsby-remark-images@next gatsby-remark-smartypants@next gatsby-plugin-sharp@next`

Next add them to your `gatsby-config.js` file. Make your config file look
something like the following:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/migrating-from-v1-to-v2.md
Expand Up @@ -345,7 +345,7 @@ Use [`gatsby-plugin-postcss`](https://github.com/gatsbyjs/gatsby/tree/master/pac

#### 1. Install the dependencies

`npm install --save gatsby-plugin-postcss postcss-import postcss-cssnext postcss-browser-reporter postcss-reporter`
`npm install gatsby-plugin-postcss postcss-import postcss-cssnext postcss-browser-reporter postcss-reporter`

**NOTE**: `postcss-cssnext` is [deprecated](https://moox.io/blog/deprecating-cssnext/) and it is better to use `postcss-preset-env`.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/porting-an-html-site-to-gatsby.md
Expand Up @@ -134,7 +134,7 @@ export default function Home() {
You might have noticed that the component in `/src/pages/index.js` doesn't include `<html>`, `<head>` or `<body>`. Gatsby makes a default HTML structure for each page and places the output from `/src/pages/index.js` into its body. More `<head>` child elements and HTML attributes are added to the output page with a module called [React Helmet](https://github.com/nfl/react-helmet). React Helmet is added to a Gatsby project in the command line with npm and then to the Gatsby config file:

```shell
npm install --save react-helmet gatsby-plugin-react-helmet
npm install react-helmet gatsby-plugin-react-helmet
```

Gatsby projects have a config file at `/gatsby-config.js` where site metadata and options can be specified and plugins added. Add a plugin line with `gatsby-plugin-react-helmet` to your config file:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/porting-from-create-react-app-to-gatsby.md
Expand Up @@ -44,7 +44,7 @@ In order to transition your codebase over to using Gatsby, a few things need to
In order to use Gatsby, you have to install it:

```shell
npm install --save gatsby
npm install gatsby
```

> **Note**: rather than using the `gatsby new` command like you would initializing a new Gatsby site, this will install Gatsby as a dependency in your project
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/post-css.md
Expand Up @@ -11,7 +11,7 @@ This guide assumes that you have a Gatsby project set up. If you need to set up
1. Install the Gatsby plugin [gatsby-plugin-postcss](/packages/gatsby-plugin-postcss/).

```shell
npm install --save gatsby-plugin-postcss
npm install gatsby-plugin-postcss
```

2. Include the plugin in your `gatsby-config.js` file.
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/recipes/sourcing-data.md
Expand Up @@ -220,7 +220,7 @@ export const pageQuery = graphql`
1. Install the `gatsby-source-wordpress` plugin by running the following command:

```shell
npm install gatsby-source-wordpress --save
npm install gatsby-source-wordpress
```

2. Configure the plugin by modifying the `gatsby-config.js` file such that it includes the following:
Expand Down Expand Up @@ -377,7 +377,7 @@ contentful space accesstoken create -s '<space ID>' --name 'Example token'
5. Install the `gatsby-source-contentful` plugin in your Gatsby site:

```shell
npm install --save gatsby-source-contentful
npm install gatsby-source-contentful
```

6. Edit the file `gatsby-config.js` and add the `gatsby-source-contentful` to the `plugins` array to enable the plugin. You should strongly consider using [environment variables](/docs/environment-variables/) to store your space ID and token for security purposes.
Expand Down Expand Up @@ -550,7 +550,7 @@ export default function AllPokemon({ pageContext: { allPokemon } }) {
1. Install the `gatsby-source-drupal` plugin.

```shell
npm install --save gatsby-source-drupal
npm install gatsby-source-drupal
```

2. Edit your `gatsby-config.js` file to enable the plugin and configure it.
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/recipes/styling-css.md
Expand Up @@ -232,7 +232,7 @@ Sass will compile `.scss` and `.sass` files to `.css` files for you, so you can

1. Install the Gatsby plugin [gatsby-plugin-sass](/plugins/gatsby-plugin-sass/) and `node-sass`.

`npm install --save node-sass gatsby-plugin-sass`
`npm install node-sass gatsby-plugin-sass`

2. Include the plugin in your `gatsby-config.js` file.

Expand Down Expand Up @@ -323,7 +323,7 @@ If fonts are not updating following steps above, make sure to replace the existi
1. Install the [Gatsby Emotion plugin](/packages/gatsby-plugin-emotion/) and Emotion packages.

```shell
npm install --save gatsby-plugin-emotion @emotion/core @emotion/styled
npm install gatsby-plugin-emotion @emotion/core @emotion/styled
```

2. Add the `gatsby-plugin-emotion` plugin to your `gatsby-config.js` file:
Expand Down Expand Up @@ -399,9 +399,9 @@ Hosting your own [Google Fonts](https://fonts.google.com/) locally within a proj

### Directions

1. Run `npm install --save typeface-your-chosen-font`, replacing `your-chosen-font` with the name of the font you want to install from [the typefaces project](https://github.com/KyleAMathews/typefaces).
1. Run `npm install typeface-your-chosen-font`, replacing `your-chosen-font` with the name of the font you want to install from [the typefaces project](https://github.com/KyleAMathews/typefaces).

An example to load the popular 'Source Sans Pro' font would be: `npm install --save typeface-source-sans-pro`.
An example to load the popular 'Source Sans Pro' font would be: `npm install typeface-source-sans-pro`.

2. Add `import "typeface-your-chosen-font"` to a layout template, page component, or `gatsby-browser.js`.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sass.md
Expand Up @@ -14,7 +14,7 @@ This guide assumes that you have a Gatsby project set up. If you need to set up

1. Install the Gatsby plugin [**gatsby-plugin-sass**](/packages/gatsby-plugin-sass/) and `node-sass`, a required peer dependency as of v2.0.0.

`npm install --save node-sass gatsby-plugin-sass`
`npm install node-sass gatsby-plugin-sass`

2. Include the plugin in your `gatsby-config.js` file.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/setting-up-gatsby-without-gatsby-new.md
Expand Up @@ -31,7 +31,7 @@ Fill out the prompts for the `package.json` file that is generated. If you'd lik
Now, you'll need to install the necessary packages that Gatsby relies on to work its magic.

```shell
npm install --save gatsby react react-dom
npm install gatsby react react-dom
```

Next, you'll add a `src` directory and a `pages` directory inside your project.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sourcing-content-from-json-or-yaml.md
Expand Up @@ -133,7 +133,7 @@ For this example, you will need to add an extra dependency so that the file cont
Open your terminal, navigate to the folder containing the Gatsby site, and issue the following command:

```shell
npm install --save js-yaml
npm install js-yaml
```

This newly added package will be responsible for loading and parsing the YAML file safely.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sourcing-from-contentful.md
Expand Up @@ -23,7 +23,7 @@ As far as pushing data out to your site goes, we suggest to you to use this fant
## Install

```shell
npm install --save gatsby-source-contentful
npm install gatsby-source-contentful
```

## How to use
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sourcing-from-flotiq.md
Expand Up @@ -74,7 +74,7 @@ Here are the steps to use this source plugin in other Gatsby projects:
1. Install the plugin:
```shell
npm install --save gatsby-source-flotiq
npm install gatsby-source-flotiq
```
2. Provide API credentials in `.env` (see above for more details)
3. Register the source plugin in `gatsby-config.js`:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sourcing-from-gentics-mesh.md
Expand Up @@ -39,7 +39,7 @@ Additionally, you need the `gatsby-source-graphql` plugin. Because Gentics Mesh
Install the plugin:

```shell
npm install --save gatsby-source-graphql
npm install gatsby-source-graphql
```

### Configure the plugin
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sourcing-from-ghost.md
Expand Up @@ -26,7 +26,7 @@ The fastest way to get started is with the official **Gatsby Starter Ghost** rep
If you prefer to start from scratch or integrate the Ghost Content API into an existing site, you can set up the **Gatsby Source Ghost** plugin.

```shell
npm install --save gatsby-source-ghost
npm install gatsby-source-ghost
```

### Configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sourcing-from-graphcms.md
Expand Up @@ -30,7 +30,7 @@ You can install this component with:

```shell
# Optionally with `npm install`
npm install --save gatsby-source-graphql
npm install gatsby-source-graphql
```

### Configure the plugin
Expand Down

0 comments on commit 699c526

Please sign in to comment.