Skip to content

Commit

Permalink
Rename all "boundActionCreators" to "actions"
Browse files Browse the repository at this point in the history
  • Loading branch information
LesleyLai committed Oct 9, 2018
1 parent 0e137b5 commit 0b11f5b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');

exports.onCreateNode = ({ node, boundActionCreators, getNode }) => {
const { createNodeField } = boundActionCreators;
exports.onCreateNode = ({ node, actions, getNode }) => {
const { createNodeField } = actions;
let relativePath;
if (node.internal.type === `MarkdownRemark`) {
const fileNode = getNode(node.parent);
Expand All @@ -21,8 +21,8 @@ exports.onCreateNode = ({ node, boundActionCreators, getNode }) => {

const { createFilePath } = require(`gatsby-source-filesystem`);

exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
const { createNodeField } = boundActionCreators;
exports.onCreateNode = ({ node, getNode, actions }) => {
const { createNodeField } = actions;
if (node.internal.type === `MarkdownRemark`) {
const relativePath = createFilePath({ node, getNode, basePath: `pages` });
createNodeField({
Expand All @@ -33,8 +33,8 @@ exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
}
};

exports.createPages = ({ graphql, boundActionCreators }) => {
const { createPage } = boundActionCreators;
exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions;
return new Promise((resolve, reject) => {
graphql(`
{
Expand Down

0 comments on commit 0b11f5b

Please sign in to comment.