Use @freecodecamp/curriculum package (#85)

Closes #84
This commit is contained in:
Stuart Taylor
2018-05-24 06:41:24 +01:00
committed by Mrugesh Mohapatra
parent c804c968dd
commit a296568e97
60 changed files with 8 additions and 128713 deletions

View File

@@ -1,24 +1,7 @@
const chokidar = require('chokidar');
const fs = require('fs-extra');
const { createChallengeNodes } = require('./create-Challenge-nodes');
exports.sourceNodes = ({ boundActionCreators, reporter }, pluginOptions) => {
if (!(pluginOptions && pluginOptions.path)) {
reporter.panic(`
"path" is a required option for gatsby-source-filesystem
See docs here - https://www.gatsbyjs.org/packages/gatsby-source-filesystem/
`);
}
// Validate that the path exists.
if (!fs.existsSync(pluginOptions.path)) {
reporter.panic(`
The path passed to fcc-source-challenges does not exist on your file system:
${pluginOptions.path}
Please use the path to the seed directory.
`);
}
if (typeof pluginOptions.source !== 'function') {
reporter.panic(`