chore(external curricula): rename script file (#59942)

This commit is contained in:
Huyen Nguyen
2025-04-24 19:26:45 +07:00
committed by GitHub
parent dcb765efc0
commit cfc41c7409
3 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -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)
@@ -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(
@@ -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');