chore: rename "part" to "step" (#43934)

* chore: rename part to step

* chore: update metas

* chore: more renaming

* chore: update tooling

* chore: update frontmatter

* chore(tools): title testing
This commit is contained in:
Nicholas Carrigan (he/him)
2021-10-21 10:07:52 -07:00
committed by GitHub
parent 6dbe68eb2f
commit b36cdbafd1
2194 changed files with 237701 additions and 237701 deletions

View File

@ -29,7 +29,7 @@ const createStepFile = ({
stepNum
});
fs.writeFileSync(`${projectPath}part-${finalStepNum}.md`, template);
fs.writeFileSync(`${projectPath}step-${finalStepNum}.md`, template);
return challengeId;
};
@ -69,7 +69,7 @@ const reorderSteps = () => {
const newStepNum = i + 1;
const newFileName =
fileName !== 'final.md'
? `part-${padWithLeadingZeros(newStepNum)}.md`
? `step-${padWithLeadingZeros(newStepNum)}.md`
: 'final.md';
return {
oldFileName: fileName,
@ -89,8 +89,8 @@ const reorderSteps = () => {
const frontMatter = matter.read(filePath);
const challengeID = frontMatter.data.id || ObjectID();
const title =
newFileName === 'final.md' ? 'Final Prototype' : `Part ${newStepNum}`;
const dashedName = `part-${newStepNum}`;
newFileName === 'final.md' ? 'Final Prototype' : `Step ${newStepNum}`;
const dashedName = `step-${newStepNum}`;
challengeOrder.push(['' + challengeID, title]);
const newData = {
...frontMatter.data,