Add newline at end of generated file content

This commit is contained in:
Eric Olkowski
2024-03-03 10:50:22 -05:00
parent 7faf5806f0
commit ffe7f1484a
3 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -10,7 +10,8 @@ async function writeExercise(exercisePath) {
}; };
// Do not edit below this line // Do not edit below this line
module.exports = ${exerciseName};`; module.exports = ${exerciseName};
`;
await writeFile( await writeFile(
join( join(
+2 -1
View File
@@ -23,7 +23,8 @@ describe('${exerciseName}', () => {
expect(${exerciseName}()).toBe(''); expect(${exerciseName}()).toBe('');
}); });
});`; });
`;
await writeFile( await writeFile(
join(exercisePath, `${trueExerciseName}.spec.js`), join(exercisePath, `${trueExerciseName}.spec.js`),
+2 -1
View File
@@ -6,7 +6,8 @@ async function writeReadme(exercisePath) {
const { exerciseNumber, exerciseName } = splitDirectoryName(exercisePath); const { exerciseNumber, exerciseName } = splitDirectoryName(exercisePath);
const readmeContent = `# Exercise ${exerciseNumber} - ${exerciseName} const readmeContent = `# Exercise ${exerciseNumber} - ${exerciseName}
Description of the exercise goes here.`; Description of the exercise goes here.
`;
await writeFile(join(exercisePath, "README.md"), readmeContent); await writeFile(join(exercisePath, "README.md"), readmeContent);
} }