Rename boundActionCreators to actions
parent
c4cfe0b1d6
commit
706a9f19df
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue