mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(client): hot-reloading challenges (#54515)
This commit is contained in:
committed by
GitHub
parent
6ae5d0bf3b
commit
7d8e3d78a1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user