You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/gatsby-codemods/README.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
##gatsby-codemods
1
+
# gatsby-codemods
2
2
3
3
A collection of codemod scripts for use with [JSCodeshift](https://github.com/facebook/jscodeshift) that help migrate to newer versions of Gatsby.
4
4
5
5
> **Note:** Codemods are designed to rewrite your project's files. Ensure you have a backup before going any further.
6
6
7
-
###Setup & Run
7
+
## Setup & Run
8
8
9
9
There are two ways to run codemods on this package.
10
10
@@ -49,9 +49,9 @@ Structure of a jscodeshift call:
49
49
- use the `--extensions` option if your files have different extensions than `.js` (for example, `--extensions js,jsx`)
50
50
- see all available [jscodeshift options](https://github.com/facebook/jscodeshift#usage-cli).
51
51
52
-
###Included scripts
52
+
## Included scripts
53
53
54
-
####`global-graphql-calls`
54
+
### `global-graphql-calls`
55
55
56
56
Add a `graphql` import to modules that use the `graphql` tag function without an import. This was supported in Gatsby v1 and deprecated for Gatsby v2.
57
57
@@ -82,7 +82,7 @@ export const query = graphql`
82
82
`
83
83
```
84
84
85
-
####`import-link`
85
+
### `import-link`
86
86
87
87
Import `Link` from `gatsby` instead of `gatsby-link` and remove the `gatsby-link` import.
88
88
@@ -103,7 +103,7 @@ export default props => (
103
103
)
104
104
```
105
105
106
-
####`navigate-calls`
106
+
### `navigate-calls`
107
107
108
108
Change the deprecated `navigateTo` method from `gatsby-link` to `navigate` from the `gatsby` module.
109
109
@@ -128,7 +128,7 @@ export default props => (
128
128
)
129
129
```
130
130
131
-
####`rename-bound-action-creators`
131
+
### `rename-bound-action-creators`
132
132
133
133
Rename `boundActionCreators` to `actions`. `boundActionCreators` has been deprecated in Gatsby v2
134
134
@@ -158,7 +158,7 @@ Example result:
158
158
}
159
159
```
160
160
161
-
###More scripts
161
+
## More scripts
162
162
163
163
Check out [issue 5038 in the Gatsby repo for additional codemod ideas](https://github.com/gatsbyjs/gatsby/issues/5038#issuecomment-411516865).
Copy file name to clipboardExpand all lines: packages/gatsby-plugin-google-analytics/README.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,15 @@
2
2
3
3
Easily add Google Analytics to your Gatsby site.
4
4
5
-
## Upgrade note
5
+
## Deprecation Notice
6
6
7
7
This plugin uses Google's `analytics.js` file under the hood. Google has a [guide recommending users upgrade to `gtag.js` instead](https://developers.google.com/analytics/devguides/collection/upgrade/analyticsjs). There is another plugin [`gatsby-plugin-gtag`](https://gatsbyjs.com/plugins/gatsby-plugin-google-gtag/) which uses `gtag.js` and we recommend it.
Copy file name to clipboardExpand all lines: packages/gatsby-plugin-google-gtag/README.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,13 @@ For more general information on gtag you can read Google's official documentatio
10
10
11
11
If you're migrating from analytics.js (gatsby-plugin-google-analytics) you can read about the subtle API differences in more depth at: https://developers.google.com/analytics/devguides/migration/ua/analyticsjs-to-gtagjs.
12
12
13
-
NOTE: This plugin only works in production mode! To test your Global Site Tag is installed and firing events correctly run: `gatsby build && gatsby serve.`
13
+
**Please note:** This plugin only works in production mode! To test your Global Site Tag is installed and firing events correctly run: `gatsby build && gatsby serve.`
Copy file name to clipboardExpand all lines: packages/gatsby-source-faker/README.md
+18-15
Original file line number
Diff line number
Diff line change
@@ -2,30 +2,33 @@
2
2
3
3
This is a plugin that allows you to use [faker.js](https://github.com/marak/Faker.js/) to generate fake data for Gatsby sites. This could come in handy for creating example sites, documentation, or just to experiment with Gatsby.
4
4
5
-
## How to use it
6
-
7
-
Install `gatsby-source-faker`
5
+
## Installation
8
6
9
7
```shell
10
8
npm install gatsby-source-faker
11
9
```
12
10
13
-
Add `gatsby-source-faker` to the `gatsby-config.js` as follows
11
+
## How to use it
12
+
13
+
Add `gatsby-source-faker` to the `gatsby-config.js` as following:
14
14
15
15
```javascript
16
-
plugins: [
17
-
{
18
-
resolve:`gatsby-source-faker`,
19
-
// derive schema from faker's options
20
-
options: {
21
-
schema: {
22
-
name: ["firstName", "lastName"],
16
+
// In your gatsby-config.js
17
+
module.exports= {
18
+
plugins: [
19
+
{
20
+
resolve:`gatsby-source-faker`,
21
+
// derive schema from faker's options
22
+
options: {
23
+
schema: {
24
+
name: ["firstName", "lastName"],
25
+
},
26
+
count:3, // how many fake objects you need
27
+
type:"NameData", // Name of the graphql query node
23
28
},
24
-
count:3, // how many fake objects you need
25
-
type:"NameData", // Name of the graphql query node
Copy file name to clipboardExpand all lines: packages/gatsby-transformer-sqip/README.md
-2
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,6 @@
22
22
23
23
This project can create beautiful results, but this comes with the cost of processing power. It may take several seconds on your machine to generate the preview. **Make sure to invest some time and to cache your `public` folder to avoid regeneration of the previews on every build.**
24
24
25
-
Netlify users might use [gatsby-plugin-netlify-cache](https://github.com/axe312ger/gatsby-plugin-netlify-cache).
26
-
27
25
<details>
28
26
<summary><strong>Table of contents:</strong></summary>
0 commit comments