docs: update projectName

This commit is contained in:
Devesh
2023-10-04 21:22:17 +05:30
parent 186f37e941
commit 917fba494b

View File

@@ -41,7 +41,10 @@ function findPreviousChallengeFilePath(tree, path, number) {
} }
export async function challengeGenerator(tree: Tree, options: Schema) { export async function challengeGenerator(tree: Tree, options: Schema) {
const { appDirectory } = getProjectDir(options.name, options.directory); const { appProjectName, appDirectory } = getProjectDir(
options.name,
options.directory
);
const difficulty = options.challengeDifficulty; const difficulty = options.challengeDifficulty;
@@ -73,7 +76,7 @@ export async function challengeGenerator(tree: Tree, options: Schema) {
generateFiles(tree, join(__dirname, 'files', 'readme'), appDirectory, { generateFiles(tree, join(__dirname, 'files', 'readme'), appDirectory, {
tmpl: '', tmpl: '',
projectName: names(options.name).name, projectName: appProjectName,
title: options.title, title: options.title,
challengeNumber, challengeNumber,
docRepository: options.docRepository, docRepository: options.docRepository,
@@ -85,7 +88,7 @@ export async function challengeGenerator(tree: Tree, options: Schema) {
`./docs/src/content/docs/challenges/${options.docRepository}`, `./docs/src/content/docs/challenges/${options.docRepository}`,
{ {
tmpl: '', tmpl: '',
projectName: names(options.name).name, projectName: appProjectName,
title: options.title, title: options.title,
challengeNumber, challengeNumber,
difficulty, difficulty,