({
challengeId,
projectPath = getProjectPath(),
title,
dashedName,
questionCount,
challengeLang
}: QuizOptions)
| 79 | }; |
| 80 | |
| 81 | const createQuizFile = ({ |
| 82 | challengeId, |
| 83 | projectPath = getProjectPath(), |
| 84 | title, |
| 85 | dashedName, |
| 86 | questionCount, |
| 87 | challengeLang |
| 88 | }: QuizOptions): ObjectId => { |
| 89 | const challengeType = challengeTypes.quiz.toString(); |
| 90 | const template = getTemplate(challengeType); |
| 91 | |
| 92 | const quizText = template({ |
| 93 | challengeId, |
| 94 | challengeType, |
| 95 | title, |
| 96 | dashedName, |
| 97 | questionCount, |
| 98 | challengeLang |
| 99 | }); |
| 100 | |
| 101 | fs.writeFileSync(`${projectPath}${challengeId.toString()}.md`, quizText); |
| 102 | return challengeId; |
| 103 | }; |
| 104 | |
| 105 | const createDialogueFile = ({ |
| 106 | challengeId, |
no test coverage detected