fix(tools): Update createStepFile function in new curriculum helper script (#41693)

* feat: add parseMDSync to parser

* fix: update createStepFile function

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Randell Dawson
2021-03-31 09:19:46 -06:00
committed by GitHub
parent 40d7e04a61
commit 5bb773fcec
4 changed files with 88 additions and 49 deletions

View File

@ -1,7 +1,7 @@
const {
reorderSteps,
createStepFile,
getChallengeSeed,
getChallengeSeeds,
padWithLeadingZeros,
getExistingStepNums,
getProjectPath,
@ -35,13 +35,13 @@ if (!allStepsExist(existingSteps, [start, end])) {
throw 'Step not created. At least one of the steps specified does not exist.';
}
const challengeSeed = getChallengeSeed(
const challengeSeeds = getChallengeSeeds(
`${projectPath}part-${padWithLeadingZeros(start)}.md`
);
createStepFile({
stepNum: start,
projectPath,
challengeSeed,
challengeSeeds,
stepBetween: true
});
console.log(`Sucessfully added step between step #${start} and step #${end}`);