mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
Add newline at end of generated file content
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
@@ -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`),
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user