Rename boundActionCreators to actions

pull/18188/head
ValeraS 2018-09-11 16:14:31 +03:00 committed by Mrugesh Mohapatra
parent c4cfe0b1d6
commit 706a9f19df
2 changed files with 6 additions and 6 deletions

View File

@ -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.

View File

@ -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;