From 706a9f19df92856f61d4203c8c9232763b6ab8e4 Mon Sep 17 00:00:00 2001 From: ValeraS Date: Tue, 11 Sep 2018 16:14:31 +0300 Subject: [PATCH] Rename boundActionCreators to actions --- packages/learn/gatsby-node.js | 8 ++++---- .../learn/plugins/fcc-source-challenges/gatsby-node.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/learn/gatsby-node.js b/packages/learn/gatsby-node.js index 112f8b070a..76950dc7f5 100644 --- a/packages/learn/gatsby-node.js +++ b/packages/learn/gatsby-node.js @@ -6,8 +6,8 @@ const { dasherize } = require('./utils'); const { blockNameify } = require('./utils/blockNameify'); const { createChallengePages, createIntroPages } = require('./utils/gatsby'); -exports.onCreateNode = function onCreateNode({ node, boundActionCreators }) { - const { createNodeField } = boundActionCreators; +exports.onCreateNode = function onCreateNode({ node, actions }) { + const { createNodeField } = actions; if (node.internal.type === 'ChallengeNode') { const { tests = [], block, title, superBlock } = node; @@ -35,8 +35,8 @@ exports.onCreateNode = function onCreateNode({ node, boundActionCreators }) { } }; -exports.createPages = ({ graphql, boundActionCreators }) => { - const { createPage } = boundActionCreators; +exports.createPages = ({ graphql, actions }) => { + const { createPage } = actions; return new Promise((resolve, reject) => { // Query for all markdown 'nodes' and for the slug we previously created. diff --git a/packages/learn/plugins/fcc-source-challenges/gatsby-node.js b/packages/learn/plugins/fcc-source-challenges/gatsby-node.js index 46987be4f6..5e06be7287 100644 --- a/packages/learn/plugins/fcc-source-challenges/gatsby-node.js +++ b/packages/learn/plugins/fcc-source-challenges/gatsby-node.js @@ -1,7 +1,7 @@ const chokidar = require('chokidar'); const { createChallengeNodes } = require('./create-Challenge-nodes'); -exports.sourceNodes = ({ boundActionCreators, reporter }, pluginOptions) => { +exports.sourceNodes = ({ actions, reporter }, pluginOptions) => { if (typeof pluginOptions.source !== 'function') { reporter.panic(` @@ -10,7 +10,7 @@ that delivers challenge files to the plugin `); } // TODO: Add live seed updates - const { createNode } = boundActionCreators; + const { createNode } = actions; let ready = false;