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

@ -4,7 +4,7 @@ const path = require('path');
const {
reorderSteps,
createStepFile,
getChallengeSeed,
getChallengeSeeds,
getProjectPath
} = require('./utils');
@ -28,14 +28,14 @@ const getLastStepFileContent = () => {
return {
nextStepNum: lastStepFileNum + 1,
challengeSeed: getChallengeSeed(projectPath + fileName)
challengeSeeds: getChallengeSeeds(projectPath + fileName)
};
};
const projectPath = getProjectPath();
const { nextStepNum, challengeSeed } = getLastStepFileContent();
const { nextStepNum, challengeSeeds } = getLastStepFileContent();
createStepFile({ stepNum: nextStepNum, projectPath, challengeSeed });
createStepFile({ stepNum: nextStepNum, projectPath, challengeSeeds });
console.log(`Sucessfully added step #${nextStepNum}`);
reorderSteps();