Rename boundActionCreators to actions
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
c4cfe0b1d6
commit
706a9f19df
@ -6,8 +6,8 @@ const { dasherize } = require('./utils');
|
|||||||
const { blockNameify } = require('./utils/blockNameify');
|
const { blockNameify } = require('./utils/blockNameify');
|
||||||
const { createChallengePages, createIntroPages } = require('./utils/gatsby');
|
const { createChallengePages, createIntroPages } = require('./utils/gatsby');
|
||||||
|
|
||||||
exports.onCreateNode = function onCreateNode({ node, boundActionCreators }) {
|
exports.onCreateNode = function onCreateNode({ node, actions }) {
|
||||||
const { createNodeField } = boundActionCreators;
|
const { createNodeField } = actions;
|
||||||
if (node.internal.type === 'ChallengeNode') {
|
if (node.internal.type === 'ChallengeNode') {
|
||||||
const { tests = [], block, title, superBlock } = node;
|
const { tests = [], block, title, superBlock } = node;
|
||||||
|
|
||||||
@ -35,8 +35,8 @@ exports.onCreateNode = function onCreateNode({ node, boundActionCreators }) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.createPages = ({ graphql, boundActionCreators }) => {
|
exports.createPages = ({ graphql, actions }) => {
|
||||||
const { createPage } = boundActionCreators;
|
const { createPage } = actions;
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// Query for all markdown 'nodes' and for the slug we previously created.
|
// Query for all markdown 'nodes' and for the slug we previously created.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const chokidar = require('chokidar');
|
const chokidar = require('chokidar');
|
||||||
const { createChallengeNodes } = require('./create-Challenge-nodes');
|
const { createChallengeNodes } = require('./create-Challenge-nodes');
|
||||||
|
|
||||||
exports.sourceNodes = ({ boundActionCreators, reporter }, pluginOptions) => {
|
exports.sourceNodes = ({ actions, reporter }, pluginOptions) => {
|
||||||
|
|
||||||
if (typeof pluginOptions.source !== 'function') {
|
if (typeof pluginOptions.source !== 'function') {
|
||||||
reporter.panic(`
|
reporter.panic(`
|
||||||
@ -10,7 +10,7 @@ that delivers challenge files to the plugin
|
|||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
// TODO: Add live seed updates
|
// TODO: Add live seed updates
|
||||||
const { createNode } = boundActionCreators;
|
const { createNode } = actions;
|
||||||
|
|
||||||
let ready = false;
|
let ready = false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user