From 63bfa0964ef2203283cb896ed826a9a90385b3ab Mon Sep 17 00:00:00 2001 From: John Bampton Date: Mon, 1 Mar 2021 20:01:34 +1000 Subject: [PATCH] chore: fix spelling, remove whitespace and fix link (#29846) --- docs/docs/conceptual/choosing-a-cms.md | 2 +- docs/docs/conceptual/gatsby-for-ecommerce.md | 4 ++-- docs/docs/glossary/npm.md | 2 +- .../how-to/performance/improving-site-performance.md | 10 +++++----- packages/gatsby-plugin-schema-snapshot/README.md | 2 +- packages/gatsby-plugin-sharp/src/gatsby-node.js | 2 +- .../gatsby-source-wordpress/docs/getting-started.md | 2 +- .../gatsby-source-wordpress/src/models/image-nodes.js | 2 +- .../create-nodes/create-remote-media-item-node.js | 2 +- .../steps/source-nodes/create-nodes/process-node.js | 2 +- rfcs/README.md | 2 +- rfcs/text/0004-native-graphql-source.md | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/docs/conceptual/choosing-a-cms.md b/docs/docs/conceptual/choosing-a-cms.md index 51764bbbe26c6..9d8e96fb10d05 100644 --- a/docs/docs/conceptual/choosing-a-cms.md +++ b/docs/docs/conceptual/choosing-a-cms.md @@ -28,7 +28,7 @@ In terms of popularity, you can see [top integrations listed by monthly download - If you're working on a personal project or prototype, a few of these have a generous free tier (Contentful, DatoCMS, Prismic, Sanity, Strapi). -- If you're looking more at "Team", "Pro", or "Business" price points (eg $29, $99, or \$299 per month), the above CMSs are all good options, plus Drupal and WordPress. +- If you're looking more at "Team", "Pro", or "Business" price points (e.g. $29, $99, or \$299 per month), the above CMSs are all good options, plus Drupal and WordPress. - If you're looking more at an "enterprise" project in the four digits per month and up, your main options are Contentful, Contentstack, Sanity, and Strapi. diff --git a/docs/docs/conceptual/gatsby-for-ecommerce.md b/docs/docs/conceptual/gatsby-for-ecommerce.md index 769a896d4321f..dc2688d945f8d 100644 --- a/docs/docs/conceptual/gatsby-for-ecommerce.md +++ b/docs/docs/conceptual/gatsby-for-ecommerce.md @@ -10,7 +10,7 @@ The website functions because these front-end capabilities integrate with a wide ### Choosing a main e-commerce platform -Most businesses choose a central e-commerce platform as their source of truth for these functionality. Some businesses choose to run entirely on these platforms, which can be quicker to get started with but lock you in to their choices for website creation (eg Liquid Templates for Shopify). +Most businesses choose a central e-commerce platform as their source of truth for these functionality. Some businesses choose to run entirely on these platforms, which can be quicker to get started with but lock you in to their choices for website creation (e.g. Liquid Templates for Shopify). If you're using or considering Gatsby, your organization is likely optimizing for specific properties of your website (such as performance, development environment, design, user experience, and security) and are therefore considering a "JAMstack", "decoupled" or "content mesh" architecture. @@ -35,7 +35,7 @@ E-commerce tends to have a number of specific requirements. When building a Gats - **Persisting a cart across site pages and between sessions** (ie, if the user closes their browser and reopens it tomorrow, the items should still be there). This can be handled either through local-storage or through the shopify-buy JS library. - **Product search** can be done client-side if the SKU count is small enough to store all products in a global state. Alternatively, it can be handled through the e-commerce provider’s search features, or if those aren’t robust enough, a third-party search provider like Algolia. - **Surfacing price adjustments** like tax, shipping, discounts/promos to the user while browsing the site. Different e-commerce solutions provide different levels of API access to these objects. -- **Handling checkout.** In order to comply with PCI regulations around storing credit card information, e-commerce providers typically exert strong control over the "buy" or "checkout" experience. Shopify requires all checkout flows using their platform to use their hosted checkout pages, though it's common to wrap them in a subdomain of the main site (eg the Gatsby/Shopify site [strivectin.com](strivectin.com] wraps a `myshopify.com` URL under a `shop.strivectin.com` URL for checkout). +- **Handling checkout.** In order to comply with PCI regulations around storing credit card information, e-commerce providers typically exert strong control over the "buy" or "checkout" experience. Shopify requires all checkout flows using their platform to use their hosted checkout pages, though it's common to wrap them in a subdomain of the main site (e.g. the Gatsby/Shopify site [strivectin.com](strivectin.com] wraps a `myshopify.com` URL under a `shop.strivectin.com` URL for checkout). - **Handling account pages.** Again, many sites choose to wrap their e-commerce provider’s account pages under their own domain. Additional resources: diff --git a/docs/docs/glossary/npm.md b/docs/docs/glossary/npm.md index 5d6ab822e1b45..8a7a30512494e 100644 --- a/docs/docs/glossary/npm.md +++ b/docs/docs/glossary/npm.md @@ -13,7 +13,7 @@ update libraries and frameworks (dependencies) for Node-based projects, and interact with the npm Registry. You'll use npm to install and upgrade Gatsby and its plugins. -npm is a [command line](/docs/glossary#command-line) tool. You'll need Terminal (Mac, Linux) or Command Prompt (Windows) in order to run its commands. To use one of npm's features, type `npm ` . For example, `npm help` displays a list of available features, including `install`, `uninstall`, `update`, and `search`. +npm is a [command line](/docs/glossary#command-line) tool. You'll need Terminal (Mac, Linux) or Command Prompt (Windows) in order to run its commands. To use one of npm's features, type `npm `. For example, `npm help` displays a list of available features, including `install`, `uninstall`, `update`, and `search`. npm is installed alongside Node during the default [installation process](/docs/tutorial/part-zero/#install-nodejs-for-your-appropriate-operating-system). You don't need to take any additional steps to add it to your environment. diff --git a/docs/docs/how-to/performance/improving-site-performance.md b/docs/docs/how-to/performance/improving-site-performance.md index 7674bd66cdfed..a8091de48dfc8 100644 --- a/docs/docs/how-to/performance/improving-site-performance.md +++ b/docs/docs/how-to/performance/improving-site-performance.md @@ -26,7 +26,7 @@ There are two options for this: - Gatsby Cloud has Lighthouse performance reports built into its CI/CD. Every time someone opens a pull request or merges into master, a Lighthouse report will be run and the performance score displayed. -- Use a third-party service that offers performance monitoring. Different services offer different options -- schedule runs on a daily basis or CI/CD integration through Github (or your source control service). +- Use a third-party service that offers performance monitoring. Different services offer different options -- schedule runs on a daily basis or CI/CD integration through GitHub (or your source control service). For additional precision, run Lighthouse multiple times and take the median result. @@ -48,7 +48,7 @@ Performance work can be surprisingly nonlinear in impact. When you run a test in your testing tool of choice, it will give you a number of recommendations. While this can feel like a laundry list of issues, it can be helpful to understand the five core categories that these issues are bucketed into. - Blocking calls & third-party scripts. -- Javascript bundle size. +- JavaScript bundle size. - Stylesheets and font files. - Images and other media. - Resource requests & CDN caching configuration. @@ -79,9 +79,9 @@ Other options include: - if you are using [html.js](https://www.gatsbyjs.org/docs/custom-html/) instead, you can modify that fileto include your snippet. -### Reduce your Javascript bundle cost +### Reduce your JavaScript bundle cost -Among all assets, Javascript can be uniquely costly to your performance. This is due to three main reasons: +Among all assets, JavaScript can be uniquely costly to your performance. This is due to three main reasons: - Like other assets, it needs to be loaded into your browser. @@ -139,7 +139,7 @@ We recommend you use the [gatsby plugin to install `loadable-components`](https: #### Step 6: Consider using the Preact plugin -[Preact](https://preactjs.com/) is a UI library that works similarly to React, but is much smaller (~3kb compressed as opposed to ~40kb). [Gatsby-plugin-preact](https://www.gatsbyjs.com/plugins/gatsby-plugin-preact/) is a drop-in plugin that will render your site in Preact instead of React, cutting 35-40kb of Javascript from your bundle. +[Preact](https://preactjs.com/) is a UI library that works similarly to React, but is much smaller (~3kb compressed as opposed to ~40kb). [Gatsby-plugin-preact](https://www.gatsbyjs.com/plugins/gatsby-plugin-preact/) is a drop-in plugin that will render your site in Preact instead of React, cutting 35-40kb of JavaScript from your bundle. This step can make sense if the `framework.js` bundle is a large part of your overall bundle size, and want to further optimize. diff --git a/packages/gatsby-plugin-schema-snapshot/README.md b/packages/gatsby-plugin-schema-snapshot/README.md index a1e5662f60a02..24be9093e9fb0 100644 --- a/packages/gatsby-plugin-schema-snapshot/README.md +++ b/packages/gatsby-plugin-schema-snapshot/README.md @@ -24,7 +24,7 @@ All configuration options are optional. plugins: [], }, // ensure all field types are included - // dont't turn this off unless you have a very good reason to + // don't turn this off unless you have a very good reason to withFieldTypes: true, // manually control if a saved schema snapshot should be replaced with an // updated version diff --git a/packages/gatsby-plugin-sharp/src/gatsby-node.js b/packages/gatsby-plugin-sharp/src/gatsby-node.js index 10f5c0360a001..6b38da6d9c47e 100644 --- a/packages/gatsby-plugin-sharp/src/gatsby-node.js +++ b/packages/gatsby-plugin-sharp/src/gatsby-node.js @@ -97,7 +97,7 @@ exports.onPostBootstrap = async ({ reporter, cache, store }) => { const job = await cache.get(contentDigest) if (job) { - // we dont have to await, gatsby does this for us + // we don't have to await, gatsby does this for us _unstable_createJob(job, { reporter }) } } diff --git a/packages/gatsby-source-wordpress/docs/getting-started.md b/packages/gatsby-source-wordpress/docs/getting-started.md index fe6eee26bb105..81efd350f0de3 100644 --- a/packages/gatsby-source-wordpress/docs/getting-started.md +++ b/packages/gatsby-source-wordpress/docs/getting-started.md @@ -11,7 +11,7 @@ If you've had previous experience with Gatsby or you like to move fast, you can - [WPGraphQL](https://wordpress.org/plugins/wp-graphql/) - [WPGatsby](https://wordpress.org/plugins/wp-gatsby/) -4. In the `gatsby-config.js` of the starter you just set up, update the plugin options for `gatsby-source-wordpress`. Change the `url` option so that it points to your WordPress instance GraphQL url. This should be the full url of your GraphQL endpoint. Eg `https://yoursite.com/graphql` +4. In the `gatsby-config.js` of the starter you just set up, update the plugin options for `gatsby-source-wordpress`. Change the `url` option so that it points to your WordPress instance GraphQL url. This should be the full url of your GraphQL endpoint. E.g. `https://yoursite.com/graphql` 5. Run `gatsby develop` and experience the magic :star2: 6. Create your beautiful and accessible app :nail_care: 7. Build with [Gatsby Cloud](https://www.gatsbyjs.com/) & deploy to [Netlify](https://www.gatsbyjs.com/guides/netlify/) for a fast, wonderful, _and_ affordable CI/CD experience :boom: :rocket: diff --git a/packages/gatsby-source-wordpress/src/models/image-nodes.js b/packages/gatsby-source-wordpress/src/models/image-nodes.js index 947f2a2fcabb4..39376b45831b7 100644 --- a/packages/gatsby-source-wordpress/src/models/image-nodes.js +++ b/packages/gatsby-source-wordpress/src/models/image-nodes.js @@ -17,7 +17,7 @@ const imageNodes = { pushNodeMeta(state, { id, sourceUrl, modifiedGmt }) { const nodeUrl = stripImageSizesFromUrl(sourceUrl) - // dont overwrite the lookup table in case we have multiple + // don't overwrite the lookup table in case we have multiple // sized urls for the same image if (!state.nodeMetaByUrl[nodeUrl]) { state.nodeMetaByUrl[nodeUrl] = { diff --git a/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-remote-media-item-node.js b/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-remote-media-item-node.js index 2679398744024..598f339bb194e 100644 --- a/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-remote-media-item-node.js +++ b/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-remote-media-item-node.js @@ -167,7 +167,7 @@ export const getFileNodeByMediaItemNode = async ({ ) { let node = await helpers.getNode(existingNodeMeta.id) - // some of the cached node metas dont necessarily need to be a File + // some of the cached node metas don't necessarily need to be a File // so make sure we return a File node if what we get isn't one if (node && node.internal && node.internal.type !== `File`) { if (node.localFile && node.localFile.id) { diff --git a/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/process-node.js b/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/process-node.js index f2cb23da72615..5b6fe72416be1 100644 --- a/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/process-node.js +++ b/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/process-node.js @@ -711,7 +711,7 @@ const replaceFileLinks = async ({ } if (node.__typename === `MediaItem`) { - // we dont' want to replace file links on MediaItem nodes because they're processed specially from other node types. + // we don't want to replace file links on MediaItem nodes because they're processed specially from other node types. // if we replace file links here then we wont be able to properly fetch the localFile node return nodeString } diff --git a/rfcs/README.md b/rfcs/README.md index 64590433bfd54..05e2a9145c2ac 100644 --- a/rfcs/README.md +++ b/rfcs/README.md @@ -53,7 +53,7 @@ RFC merged into the RFC repo as a markdown file. At that point, the RFC is 'active' and may be implemented with the goal of eventual inclusion into Gatsby. -- Fork the RFC repo http://github.com/gatsbyjs/rfcs +- Fork the RFC repo https://github.com/gatsbyjs/rfcs - Copy `0000-template.md` to `text/0000-my-feature.md` (where 'my-feature' is descriptive. Don't assign an RFC number yet). - Fill in the RFC. Put care into the details: **RFCs that do not diff --git a/rfcs/text/0004-native-graphql-source.md b/rfcs/text/0004-native-graphql-source.md index 73c38a05a84f8..d391c30419718 100644 --- a/rfcs/text/0004-native-graphql-source.md +++ b/rfcs/text/0004-native-graphql-source.md @@ -126,8 +126,8 @@ This is a higher level plugin. Instead of just merging a schema, it allows a mor - `url: string?` - url of a third-party service - `headers: object?` - headers to add to the request - `fetchOptions: object?` - additional `node-fetch` options -- `createLink: (options: object) => ApolloLink` - a callback that will create an ApolloLink instance that should query the third-party API. An escape hatch that overrides `url`, `headers` and `fetchOptions` parameters above and allows complex logic for eg authorization -- `createSchema: (options: object) => GraphQLSchema` - callback that will create a GraphQLSchema of a third-party API. Resolvers are going to be ignored. This allows not using introspection (eg if it's disabled) or to customize third-party schema before passing it to stitching +- `createLink: (options: object) => ApolloLink` - a callback that will create an ApolloLink instance that should query the third-party API. An escape hatch that overrides `url`, `headers` and `fetchOptions` parameters above and allows complex logic for e.g. authorization +- `createSchema: (options: object) => GraphQLSchema` - callback that will create a GraphQLSchema of a third-party API. Resolvers are going to be ignored. This allows not using introspection (e.g. if it's disabled) or to customize third-party schema before passing it to stitching Either `url` or `createLink` must be specified. If no `createSchema` is passed, third-party schema must support introspection.