mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor: bundle shared so each consumer can require/import without hassle (#64167)
This commit is contained in:
committed by
GitHub
parent
ddfd598eb4
commit
f03ad05e84
@@ -9,7 +9,7 @@ import {
|
||||
SuperBlocks,
|
||||
SuperBlockStage,
|
||||
superBlockStages
|
||||
} from '../../../shared-dist/config/curriculum';
|
||||
} from '@freecodecamp/shared/config/curriculum';
|
||||
import {
|
||||
superblockSchemaValidator,
|
||||
availableSuperBlocksValidator
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { mkdirSync, writeFileSync, readFileSync } from 'fs';
|
||||
import { resolve, dirname } from 'path';
|
||||
import { omit } from 'lodash';
|
||||
import { submitTypes } from '../../../shared-dist/config/challenge-types';
|
||||
import { SuperBlocks } from '../../../shared-dist/config/curriculum';
|
||||
import { submitTypes } from '@freecodecamp/shared/config/challenge-types';
|
||||
import { SuperBlocks } from '@freecodecamp/shared/config/curriculum';
|
||||
import { patchBlock } from './patches';
|
||||
|
||||
export type CurriculumIntros = {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
SuperBlocks,
|
||||
SuperBlockStage,
|
||||
superBlockStages
|
||||
} from '../../../shared-dist/config/curriculum';
|
||||
} from '@freecodecamp/shared/config/curriculum';
|
||||
import {
|
||||
superblockSchemaValidator,
|
||||
availableSuperBlocksValidator
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { mkdirSync, writeFileSync, readFileSync } from 'fs';
|
||||
import { resolve, dirname } from 'path';
|
||||
import { omit } from 'lodash';
|
||||
import { submitTypes } from '../../../shared-dist/config/challenge-types';
|
||||
import { submitTypes } from '@freecodecamp/shared/config/challenge-types';
|
||||
import { type ChallengeNode } from '../../src/redux/prop-types';
|
||||
import {
|
||||
SuperBlocks,
|
||||
chapterBasedSuperBlocks
|
||||
} from '../../../shared-dist/config/curriculum';
|
||||
import type { Chapter } from '../../../shared-dist/config/chapters';
|
||||
} from '@freecodecamp/shared/config/curriculum';
|
||||
import type { Chapter } from '@freecodecamp/shared/config/chapters';
|
||||
import { getSuperblockStructure } from '../../../curriculum/src/file-handler';
|
||||
import { patchBlock } from './patches';
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const CURRICULUM_PATH = '../../../shared-dist/config/curriculum.json';
|
||||
const CURRICULUM_PATH = '../../../curriculum/generated/curriculum.json';
|
||||
// const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
// Curriculum is read using fs, because it is too large for VSCode's LSP to handle type inference which causes annoying behavior.
|
||||
const curriculum = JSON.parse(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Joi from 'joi';
|
||||
import { chapterBasedSuperBlocks } from '../../../shared-dist/config/curriculum';
|
||||
import { chapterBasedSuperBlocks } from '@freecodecamp/shared/config/curriculum';
|
||||
|
||||
const blockSchema = Joi.object({}).keys({
|
||||
desc: Joi.array().min(1),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Joi from 'joi';
|
||||
import { chapterBasedSuperBlocks } from '../../../shared-dist/config/curriculum';
|
||||
import { chapterBasedSuperBlocks } from '@freecodecamp/shared/config/curriculum';
|
||||
|
||||
const slugRE = new RegExp('^[a-z0-9-]+$');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user