mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-17 22:01:24 -04:00
fix: direct import from curriculum (#62931)
This commit is contained in:
committed by
GitHub
parent
b8f089810f
commit
e42a864e12
@@ -1,6 +1,8 @@
|
||||
const path = require('path');
|
||||
const chokidar = require('chokidar');
|
||||
const { getSuperblockStructure } = require('../../../curriculum/file-handler');
|
||||
const {
|
||||
superBlockToFilename
|
||||
} = require('../../../curriculum/build-curriculum');
|
||||
|
||||
const { createChallengeNode } = require('./create-challenge-nodes');
|
||||
|
||||
@@ -91,21 +93,6 @@ exports.sourceNodes = function sourceChallengesSourceNodes(
|
||||
}
|
||||
|
||||
function createSuperBlockStructureNodes() {
|
||||
const buildCurriculumPath = path.resolve(
|
||||
curriculumPath,
|
||||
'..',
|
||||
'..',
|
||||
'build-curriculum'
|
||||
);
|
||||
const buildCurriculum = require(buildCurriculumPath);
|
||||
const superBlockToFilename = buildCurriculum.superBlockToFilename;
|
||||
|
||||
if (!superBlockToFilename) {
|
||||
reporter.panic(
|
||||
'superBlockToFilename is missing from build-curriculum. This map is required.'
|
||||
);
|
||||
}
|
||||
|
||||
Object.keys(superBlockToFilename).forEach(superBlock => {
|
||||
const filename = superBlockToFilename[superBlock] || superBlock;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user