chore: remove curriculum 'main' file
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
6b303bac12
commit
b96f450851
@ -1,25 +0,0 @@
|
|||||||
const invariant = require('invariant');
|
|
||||||
|
|
||||||
const {
|
|
||||||
curriculum: curriculumLangs
|
|
||||||
} = require('../client/i18n/allLangs').availableLangs;
|
|
||||||
|
|
||||||
function validateLang(lang) {
|
|
||||||
invariant(lang, 'Please provide a language');
|
|
||||||
invariant(
|
|
||||||
curriculumLangs.includes(lang),
|
|
||||||
`${lang} is not supported
|
|
||||||
|
|
||||||
Supported languages: ${JSON.stringify(curriculumLangs, null, 2)}
|
|
||||||
|
|
||||||
`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCurriculum(lang) {
|
|
||||||
validateLang(lang);
|
|
||||||
const curriculum = require(`./build/curriculum-${lang}.json`);
|
|
||||||
return curriculum;
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.getChallengesForLang = getCurriculum;
|
|
@ -12,7 +12,6 @@
|
|||||||
"url": "https://github.com/freeCodeCamp/freeCodeCamp/issues"
|
"url": "https://github.com/freeCodeCamp/freeCodeCamp/issues"
|
||||||
},
|
},
|
||||||
"version": "0.0.0-next.4",
|
"version": "0.0.0-next.4",
|
||||||
"main": "lib.js",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"create-empty-steps": "cross-env CALLING_DIR=$INIT_CWD node ../tools/challenge-helper-scripts/create-empty-steps",
|
"create-empty-steps": "cross-env CALLING_DIR=$INIT_CWD node ../tools/challenge-helper-scripts/create-empty-steps",
|
||||||
"create-next-step": "cross-env CALLING_DIR=$INIT_CWD node ../tools/challenge-helper-scripts/create-next-step",
|
"create-next-step": "cross-env CALLING_DIR=$INIT_CWD node ../tools/challenge-helper-scripts/create-next-step",
|
||||||
|
Reference in New Issue
Block a user