diff --git a/client/src/templates/Challenges/components/scene/scene-assets.tsx b/client/src/templates/Challenges/components/scene/scene-assets.tsx index 88b6a98813f..cccd10789ff 100644 --- a/client/src/templates/Challenges/components/scene/scene-assets.tsx +++ b/client/src/templates/Challenges/components/scene/scene-assets.tsx @@ -1,5 +1,5 @@ // TODO: get domain from env -const domain = +export const domain = 'https://cdn.freecodecamp.org/curriculum/english/animation-assets'; export const sounds = `${domain}/sounds`; diff --git a/client/tools/external-curriculum/build-external-curricula-data-v2.ts b/client/tools/external-curriculum/build-external-curricula-data-v2.ts index d3a0b9186f0..a6129e6c044 100644 --- a/client/tools/external-curriculum/build-external-curricula-data-v2.ts +++ b/client/tools/external-curriculum/build-external-curricula-data-v2.ts @@ -10,6 +10,16 @@ import { import type { Chapter } from '../../../shared-dist/config/chapters'; import { getSuperblockStructure } from '../../../curriculum/src/file-handler'; import { patchBlock } from './patches'; +import { + availableBackgrounds, + availableAudios +} from '../../../curriculum/schema/scene-assets.js'; +import { + characterAssets, + sounds, + backgrounds, + domain +} from '../../src/templates/Challenges/components/scene/scene-assets.js'; export type CurriculumIntros = | BlockBasedCurriculumIntros @@ -313,6 +323,7 @@ export function buildExtCurriculumDataV2( parseCurriculumData(); getSubmitTypes(); + getSceneAssets(); function parseCurriculumData() { const superBlockKeys = Object.values(SuperBlocks).filter(x => @@ -434,4 +445,20 @@ export function buildExtCurriculumDataV2( JSON.stringify(submitTypes, null, 2) ); } + + function getSceneAssets() { + const sceneAssets = { + domain, + backgrounds, + sounds, + availableBackgrounds, + availableAudios, + characterAssets + }; + + writeFileSync( + `${dataPath}/${ver}/scene-assets.json`, + JSON.stringify(sceneAssets, null, 2) + ); + } }