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-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
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).
0 commit comments