fix: rename superblock to use /2022/ (#44535)
* chore: update superblock properties * refactor: remove isAudited from certs It was always defaulting to English, anyway. * refactor: get superblock from metas, not dirs * fix: rename responsive-web-design-22 This converts the slugs to /2022/responsive-web-design * refactor: remove unused export * test: update test with new curriculum config * refactor: use key not [key] * refactor: remove directory reference from test
This commit is contained in:
committed by
GitHub
parent
198150217a
commit
ff566d441a
@ -6,7 +6,6 @@ const envData = require('../../config/env.json');
|
||||
const {
|
||||
getChallengesForLang,
|
||||
createChallenge,
|
||||
createCertification,
|
||||
challengesDir,
|
||||
getChallengesDirForLang
|
||||
} = require('../../curriculum/getChallenges');
|
||||
@ -26,11 +25,14 @@ exports.replaceChallengeNode = () => {
|
||||
`../../curriculum/challenges/_meta/${blockName}/meta.json`
|
||||
);
|
||||
delete require.cache[require.resolve(metaPath)];
|
||||
const isCert = path.extname(filePath) === '.yml';
|
||||
const meta = require(metaPath);
|
||||
return isCert
|
||||
? await createCertification(challengesDir, filePath, curriculumLocale)
|
||||
: await createChallenge(challengesDir, filePath, curriculumLocale, meta);
|
||||
// TODO: reimplement hot-reloading of certifications
|
||||
return await createChallenge(
|
||||
challengesDir,
|
||||
filePath,
|
||||
curriculumLocale,
|
||||
meta
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user