chore: use constants for superblocks (#43886)
* chore: use constants for superblocks * add prettier ts dec to challenge-helper-scripts * config/ to ts. broken * typescripterise tools/ and config/ * create global tsconfig, remove alternate configs * delete temp ts->js, add to gitignore * fix gitignore * re-import SuperBlocks in super-block-intro.tsx * remove renamed files added again * fix config * remove accidental files * remove snap * delete built files * adjust eslintrc for enums * add node types to root * ignore build files in lint and prettier * fix tools/ in tsconfig * ignore annoying ts warnings * prettierise Map/index.tsx * fix enum to match lint rule * rejig Map to render RWD superblock * 'pretty minor' - implicitly tsc within root Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> * fix client/package.json for Gitpod * broken: migrate @types to root * fix: use typeRoots to prevent duplication * fix show.tsx, try typeroots in root * silly fix for duplicate node_modules types * remove typeRoots from root * fix: tsconfig or not tsconfig, that is the... * fix: ...question: Whether 'tis nobler in the mind to suffer the slings and arrows of outrageous configs... * fix: Or to take Arms against a Sea of lint errors And by opposing end them Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const certTypes = {
|
||||
export const certTypes = {
|
||||
frontEnd: 'isFrontEndCert',
|
||||
backEnd: 'isBackEndCert',
|
||||
dataVis: 'isDataVisCert',
|
||||
@@ -17,7 +17,22 @@ const certTypes = {
|
||||
relationalDatabasesV8: 'isRelationalDatabasesCertV8'
|
||||
};
|
||||
|
||||
const certIds = {
|
||||
export enum SuperBlocks {
|
||||
RespWebDesign = 'responsive-web-design',
|
||||
JsAlgoDataStruct = 'javascript-algorithms-and-data-structures',
|
||||
FrontEndDevLibs = 'front-end-development-libraries',
|
||||
DataVis = 'data-visualization',
|
||||
RelationalDb = 'relational-databases',
|
||||
BackEndDevApis = 'back-end-development-and-apis',
|
||||
QualityAssurance = 'quality-assurance',
|
||||
SciCompPy = 'scientific-computing-with-python',
|
||||
DataAnalysisPy = 'data-analysis-with-python',
|
||||
InfoSec = 'information-security',
|
||||
MachineLearningPy = 'machine-learning-with-python',
|
||||
CodingInterviewPrep = 'coding-interview-prep'
|
||||
}
|
||||
|
||||
export const certIds = {
|
||||
legacyFrontEndChallengeId: '561add10cb82ac38a17513be',
|
||||
legacyBackEndChallengeId: '660add10cb82ac38a17513be',
|
||||
legacyDataVisId: '561add10cb82ac39a17513bc',
|
||||
@@ -36,7 +51,7 @@ const certIds = {
|
||||
relationalDatabasesV8Id: '606243f50267e718b1e755f4'
|
||||
};
|
||||
|
||||
const completionHours = {
|
||||
export const completionHours = {
|
||||
[certTypes.frontEnd]: 400,
|
||||
[certTypes.backEnd]: 400,
|
||||
[certTypes.dataVis]: 400,
|
||||
@@ -55,7 +70,7 @@ const completionHours = {
|
||||
[certTypes.relationalDatabasesV8]: 300
|
||||
};
|
||||
|
||||
const certSlugTypeMap = {
|
||||
export const certSlugTypeMap = {
|
||||
// legacy
|
||||
'legacy-front-end': certTypes.frontEnd,
|
||||
'legacy-back-end': certTypes.backEnd,
|
||||
@@ -66,11 +81,11 @@ const certSlugTypeMap = {
|
||||
'full-stack': certTypes.fullStack,
|
||||
|
||||
// modern
|
||||
'responsive-web-design': certTypes.respWebDesign,
|
||||
'javascript-algorithms-and-data-structures': certTypes.jsAlgoDataStruct,
|
||||
'front-end-development-libraries': certTypes.frontEndDevLibs,
|
||||
'data-visualization': certTypes.dataVis2018,
|
||||
'back-end-development-and-apis': certTypes.apisMicroservices,
|
||||
[SuperBlocks.RespWebDesign]: certTypes.respWebDesign,
|
||||
[SuperBlocks.JsAlgoDataStruct]: certTypes.jsAlgoDataStruct,
|
||||
[SuperBlocks.FrontEndDevLibs]: certTypes.frontEndDevLibs,
|
||||
[SuperBlocks.DataVis]: certTypes.dataVis2018,
|
||||
[SuperBlocks.BackEndDevApis]: certTypes.apisMicroservices,
|
||||
'quality-assurance-v7': certTypes.qaV7,
|
||||
'information-security-v7': certTypes.infosecV7,
|
||||
'scientific-computing-with-python-v7': certTypes.sciCompPyV7,
|
||||
@@ -79,7 +94,7 @@ const certSlugTypeMap = {
|
||||
'relational-databases-v8': certTypes.relationalDatabasesV8
|
||||
};
|
||||
|
||||
const superBlockCertTypeMap = {
|
||||
export const superBlockCertTypeMap = {
|
||||
// legacy
|
||||
'legacy-front-end': certTypes.frontEnd,
|
||||
'legacy-back-end': certTypes.backEnd,
|
||||
@@ -88,20 +103,20 @@ const superBlockCertTypeMap = {
|
||||
'full-stack': certTypes.fullStack,
|
||||
|
||||
// modern
|
||||
'responsive-web-design': certTypes.respWebDesign,
|
||||
'javascript-algorithms-and-data-structures': certTypes.jsAlgoDataStruct,
|
||||
'front-end-development-libraries': certTypes.frontEndDevLibs,
|
||||
'data-visualization': certTypes.dataVis2018,
|
||||
'back-end-development-and-apis': certTypes.apisMicroservices,
|
||||
'quality-assurance': certTypes.qaV7,
|
||||
'information-security': certTypes.infosecV7,
|
||||
'scientific-computing-with-python': certTypes.sciCompPyV7,
|
||||
'data-analysis-with-python': certTypes.dataAnalysisPyV7,
|
||||
'machine-learning-with-python': certTypes.machineLearningPyV7,
|
||||
'relational-databases': certTypes.relationalDatabasesV8
|
||||
[SuperBlocks.RespWebDesign]: certTypes.respWebDesign,
|
||||
[SuperBlocks.JsAlgoDataStruct]: certTypes.jsAlgoDataStruct,
|
||||
[SuperBlocks.FrontEndDevLibs]: certTypes.frontEndDevLibs,
|
||||
[SuperBlocks.DataVis]: certTypes.dataVis2018,
|
||||
[SuperBlocks.BackEndDevApis]: certTypes.apisMicroservices,
|
||||
[SuperBlocks.QualityAssurance]: certTypes.qaV7,
|
||||
[SuperBlocks.InfoSec]: certTypes.infosecV7,
|
||||
[SuperBlocks.SciCompPy]: certTypes.sciCompPyV7,
|
||||
[SuperBlocks.DataAnalysisPy]: certTypes.dataAnalysisPyV7,
|
||||
[SuperBlocks.MachineLearningPy]: certTypes.machineLearningPyV7,
|
||||
[SuperBlocks.RelationalDb]: certTypes.relationalDatabasesV8
|
||||
};
|
||||
|
||||
const certTypeIdMap = {
|
||||
export const certTypeIdMap = {
|
||||
[certTypes.frontEnd]: certIds.legacyFrontEndChallengeId,
|
||||
[certTypes.backEnd]: certIds.legacyBackEndChallengeId,
|
||||
[certTypes.dataVis]: certIds.legacyDataVisId,
|
||||
@@ -120,7 +135,7 @@ const certTypeIdMap = {
|
||||
[certTypes.relationalDatabasesV8]: certIds.relationalDatabasesV8Id
|
||||
};
|
||||
|
||||
const certTypeTitleMap = {
|
||||
export const certTypeTitleMap = {
|
||||
[certTypes.frontEnd]: 'Legacy Front End',
|
||||
[certTypes.backEnd]: 'Legacy Back End',
|
||||
[certTypes.dataVis]: 'Legacy Data Visualization',
|
||||
@@ -139,11 +154,4 @@ const certTypeTitleMap = {
|
||||
[certTypes.relationalDatabasesV8]: 'Relational Databases'
|
||||
};
|
||||
|
||||
exports.oldDataVizId = '561add10cb82ac38a17513b3';
|
||||
exports.completionHours = completionHours;
|
||||
exports.certTypes = certTypes;
|
||||
exports.superBlockCertTypeMap = superBlockCertTypeMap;
|
||||
exports.certSlugTypeMap = certSlugTypeMap;
|
||||
exports.certIds = certIds;
|
||||
exports.certTypeIdMap = certTypeIdMap;
|
||||
exports.certTypeTitleMap = certTypeTitleMap;
|
||||
export const oldDataVizId = '561add10cb82ac38a17513b3';
|
@@ -1,5 +1,5 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
import { SuperBlocks } from '../certification-settings';
|
||||
/*
|
||||
* List of languages with localizations enabled for builds.
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
* An error will be thrown if the CLIENT_LOCALE and CURRICULUM_LOCALE variables
|
||||
* from the .env file aren't found in their respective arrays below
|
||||
*/
|
||||
const availableLangs = {
|
||||
export const availableLangs = {
|
||||
client: [
|
||||
'english',
|
||||
'espanol',
|
||||
@@ -35,61 +35,61 @@ const availableLangs = {
|
||||
* certifications which have not been audited & approved will fallback to
|
||||
* English equivalent.
|
||||
*/
|
||||
const auditedCerts = {
|
||||
export const auditedCerts = {
|
||||
espanol: [
|
||||
'responsive-web-design',
|
||||
'javascript-algorithms-and-data-structures',
|
||||
'front-end-development-libraries',
|
||||
'data-visualization',
|
||||
'back-end-development-and-apis'
|
||||
SuperBlocks.RespWebDesign,
|
||||
SuperBlocks.JsAlgoDataStruct,
|
||||
SuperBlocks.FrontEndDevLibs,
|
||||
SuperBlocks.DataVis,
|
||||
SuperBlocks.BackEndDevApis
|
||||
],
|
||||
chinese: [
|
||||
'responsive-web-design',
|
||||
'javascript-algorithms-and-data-structures',
|
||||
'front-end-development-libraries',
|
||||
'data-visualization',
|
||||
'back-end-development-and-apis',
|
||||
'quality-assurance',
|
||||
'scientific-computing-with-python',
|
||||
'data-analysis-with-python',
|
||||
'information-security',
|
||||
'machine-learning-with-python'
|
||||
SuperBlocks.RespWebDesign,
|
||||
SuperBlocks.JsAlgoDataStruct,
|
||||
SuperBlocks.FrontEndDevLibs,
|
||||
SuperBlocks.DataVis,
|
||||
SuperBlocks.BackEndDevApis,
|
||||
SuperBlocks.QualityAssurance,
|
||||
SuperBlocks.SciCompPy,
|
||||
SuperBlocks.DataAnalysisPy,
|
||||
SuperBlocks.InfoSec,
|
||||
SuperBlocks.MachineLearningPy
|
||||
],
|
||||
'chinese-traditional': [
|
||||
'responsive-web-design',
|
||||
'javascript-algorithms-and-data-structures',
|
||||
'front-end-development-libraries',
|
||||
'data-visualization',
|
||||
'back-end-development-and-apis',
|
||||
'quality-assurance',
|
||||
'scientific-computing-with-python',
|
||||
'data-analysis-with-python',
|
||||
'information-security',
|
||||
'machine-learning-with-python'
|
||||
SuperBlocks.RespWebDesign,
|
||||
SuperBlocks.JsAlgoDataStruct,
|
||||
SuperBlocks.FrontEndDevLibs,
|
||||
SuperBlocks.DataVis,
|
||||
SuperBlocks.BackEndDevApis,
|
||||
SuperBlocks.QualityAssurance,
|
||||
SuperBlocks.SciCompPy,
|
||||
SuperBlocks.DataAnalysisPy,
|
||||
SuperBlocks.InfoSec,
|
||||
SuperBlocks.MachineLearningPy
|
||||
],
|
||||
italian: [
|
||||
'responsive-web-design',
|
||||
'javascript-algorithms-and-data-structures',
|
||||
'front-end-development-libraries',
|
||||
'data-visualization',
|
||||
'back-end-development-and-apis',
|
||||
'quality-assurance',
|
||||
'scientific-computing-with-python',
|
||||
'data-analysis-with-python',
|
||||
'information-security',
|
||||
'machine-learning-with-python'
|
||||
SuperBlocks.RespWebDesign,
|
||||
SuperBlocks.JsAlgoDataStruct,
|
||||
SuperBlocks.FrontEndDevLibs,
|
||||
SuperBlocks.DataVis,
|
||||
SuperBlocks.BackEndDevApis,
|
||||
SuperBlocks.QualityAssurance,
|
||||
SuperBlocks.SciCompPy,
|
||||
SuperBlocks.DataAnalysisPy,
|
||||
SuperBlocks.InfoSec,
|
||||
SuperBlocks.MachineLearningPy
|
||||
],
|
||||
portuguese: [
|
||||
'responsive-web-design',
|
||||
'javascript-algorithms-and-data-structures',
|
||||
'front-end-development-libraries',
|
||||
'data-visualization',
|
||||
'back-end-development-and-apis',
|
||||
'quality-assurance',
|
||||
'scientific-computing-with-python',
|
||||
'data-analysis-with-python',
|
||||
'information-security',
|
||||
'machine-learning-with-python'
|
||||
SuperBlocks.RespWebDesign,
|
||||
SuperBlocks.JsAlgoDataStruct,
|
||||
SuperBlocks.FrontEndDevLibs,
|
||||
SuperBlocks.DataVis,
|
||||
SuperBlocks.BackEndDevApis,
|
||||
SuperBlocks.QualityAssurance,
|
||||
SuperBlocks.SciCompPy,
|
||||
SuperBlocks.DataAnalysisPy,
|
||||
SuperBlocks.InfoSec,
|
||||
SuperBlocks.MachineLearningPy
|
||||
]
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ const auditedCerts = {
|
||||
* string for the language to take advantage of available functionality.
|
||||
* Use a 639-1 code here https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
||||
*/
|
||||
const i18nextCodes = {
|
||||
export const i18nextCodes = {
|
||||
english: 'en',
|
||||
espanol: 'es',
|
||||
chinese: 'zh',
|
||||
@@ -111,7 +111,7 @@ const i18nextCodes = {
|
||||
};
|
||||
|
||||
// These are for the language selector dropdown menu in the footer
|
||||
const langDisplayNames = {
|
||||
export const langDisplayNames = {
|
||||
english: 'English',
|
||||
espanol: 'Español',
|
||||
chinese: '中文(简体字)',
|
||||
@@ -124,7 +124,7 @@ const langDisplayNames = {
|
||||
* There's an example in profile/components/Camper.js
|
||||
* List: https://github.com/unicode-cldr/cldr-dates-modern/tree/master/main
|
||||
*/
|
||||
const langCodes = {
|
||||
export const langCodes = {
|
||||
english: 'en-US',
|
||||
espanol: 'es-419',
|
||||
chinese: 'zh',
|
||||
@@ -132,9 +132,3 @@ const langCodes = {
|
||||
italian: 'it',
|
||||
portuguese: 'pt-BR'
|
||||
};
|
||||
|
||||
exports.availableLangs = availableLangs;
|
||||
exports.i18nextCodes = i18nextCodes;
|
||||
exports.langDisplayNames = langDisplayNames;
|
||||
exports.langCodes = langCodes;
|
||||
exports.auditedCerts = auditedCerts;
|
Reference in New Issue
Block a user