mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
chore(external curricula): rename script file (#59942)
This commit is contained in:
@@ -3,10 +3,10 @@ import path from 'path';
|
|||||||
|
|
||||||
import { getChallengesForLang } from '../../../curriculum/get-challenges';
|
import { getChallengesForLang } from '../../../curriculum/get-challenges';
|
||||||
import {
|
import {
|
||||||
buildExtCurriculumData,
|
buildExtCurriculumDataV1,
|
||||||
Curriculum,
|
Curriculum,
|
||||||
CurriculumProps
|
CurriculumProps
|
||||||
} from './build-external-curricula-data';
|
} from './build-external-curricula-data-v1';
|
||||||
|
|
||||||
const globalConfigPath = path.resolve(__dirname, '../../../shared/config');
|
const globalConfigPath = path.resolve(__dirname, '../../../shared/config');
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ const globalConfigPath = path.resolve(__dirname, '../../../shared/config');
|
|||||||
// across all languages.
|
// across all languages.
|
||||||
void getChallengesForLang('english')
|
void getChallengesForLang('english')
|
||||||
.then((result: Record<string, unknown>) => {
|
.then((result: Record<string, unknown>) => {
|
||||||
buildExtCurriculumData('v1', result as Curriculum<CurriculumProps>);
|
buildExtCurriculumDataV1(result as Curriculum<CurriculumProps>);
|
||||||
return result;
|
return result;
|
||||||
})
|
})
|
||||||
.then(JSON.stringify)
|
.then(JSON.stringify)
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import {
|
|||||||
type CurriculumIntros,
|
type CurriculumIntros,
|
||||||
type GeneratedCurriculumProps,
|
type GeneratedCurriculumProps,
|
||||||
orderedSuperBlockInfo
|
orderedSuperBlockInfo
|
||||||
} from './build-external-curricula-data';
|
} from './build-external-curricula-data-v1';
|
||||||
|
|
||||||
const VERSION = 'v1';
|
const VERSION = 'v1';
|
||||||
const intros = JSON.parse(
|
const intros = JSON.parse(
|
||||||
+3
-2
@@ -35,6 +35,8 @@ interface Block<T> {
|
|||||||
meta: Record<string, unknown>;
|
meta: Record<string, unknown>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ver = 'v1';
|
||||||
|
|
||||||
export const orderedSuperBlockInfo = [
|
export const orderedSuperBlockInfo = [
|
||||||
{ dashedName: SuperBlocks.RespWebDesignNew, public: true },
|
{ dashedName: SuperBlocks.RespWebDesignNew, public: true },
|
||||||
{ dashedName: SuperBlocks.DataAnalysisPy, public: true },
|
{ dashedName: SuperBlocks.DataAnalysisPy, public: true },
|
||||||
@@ -63,8 +65,7 @@ export const orderedSuperBlockInfo = [
|
|||||||
|
|
||||||
const dashedNames = orderedSuperBlockInfo.map(({ dashedName }) => dashedName);
|
const dashedNames = orderedSuperBlockInfo.map(({ dashedName }) => dashedName);
|
||||||
|
|
||||||
export function buildExtCurriculumData(
|
export function buildExtCurriculumDataV1(
|
||||||
ver: string,
|
|
||||||
curriculum: Curriculum<CurriculumProps>
|
curriculum: Curriculum<CurriculumProps>
|
||||||
): void {
|
): void {
|
||||||
const staticFolderPath = resolve(__dirname, '../../../client/static');
|
const staticFolderPath = resolve(__dirname, '../../../client/static');
|
||||||
Reference in New Issue
Block a user