mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat(curriculum): implement selective build mode for curriculum processing (#63081)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -15,16 +15,23 @@ import {
|
||||
|
||||
const globalConfigPath = path.resolve(__dirname, '../../../shared-dist/config');
|
||||
|
||||
// We are defaulting to English because the ids for the challenges are same
|
||||
// across all languages.
|
||||
const isSelectiveBuild = !!process.env.FCC_SUPERBLOCK;
|
||||
|
||||
void getChallengesForLang('english')
|
||||
.then(result => {
|
||||
buildExtCurriculumDataV1(
|
||||
result as unknown as CurriculumV1<CurriculumPropsV1>
|
||||
);
|
||||
buildExtCurriculumDataV2(
|
||||
result as unknown as CurriculumV2<CurriculumPropsV2>
|
||||
);
|
||||
if (!isSelectiveBuild) {
|
||||
console.log('Building external curriculum data...');
|
||||
buildExtCurriculumDataV1(
|
||||
result as unknown as CurriculumV1<CurriculumPropsV1>
|
||||
);
|
||||
buildExtCurriculumDataV2(
|
||||
result as unknown as CurriculumV2<CurriculumPropsV2>
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
'Skipping external curriculum build (selective build mode active)'
|
||||
);
|
||||
}
|
||||
return result;
|
||||
})
|
||||
.then(JSON.stringify)
|
||||
|
||||
Reference in New Issue
Block a user