Skip to content

Commit

Permalink
fix(client): hot-reloading challenges (freeCodeCamp#54515)
Browse files Browse the repository at this point in the history
  • Loading branch information
ojeytonwilliams authored and pull[bot] committed Aug 8, 2024
1 parent 078f5aa commit a76200b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/utils/build-challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ exports.replaceChallengeNode = () => {
const metaPath = path.resolve(META_DIR, `${blockName}/meta.json`);
delete require.cache[require.resolve(metaPath)];
const meta = require(metaPath);
const englishPath = path.resolve(CHALLENGES_DIR, 'english', filePath);
const i18nPath = path.resolve(CHALLENGES_DIR, curriculumLocale, filePath);
// TODO: reimplement hot-reloading of certifications
const createChallenge = generateChallengeCreator(
curriculumLocale,
englishPath,
i18nPath
);
return await createChallenge(filePath, meta);
};
};

const createChallenge = generateChallengeCreator(
CHALLENGES_DIR,
curriculumLocale
);

exports.buildChallenges = async function buildChallenges() {
const curriculum = await getChallengesForLang(curriculumLocale);
const superBlocks = Object.keys(curriculum);
Expand Down

0 comments on commit a76200b

Please sign in to comment.