@25sprout/react-starter
Version:
25sprout web starter with React
18 lines (12 loc) • 433 B
JavaScript
import fs from 'fs/promises';
async function processReadme(projectPath, options) {
const projectName = options.name || 'react-starter';
try {
const file = await fs.readFile(`${projectPath}/README.md`, { encoding: 'utf8' });
const newFile = file.replace('{{name}}', projectName);
await fs.writeFile(`${projectPath}/README.md`, newFile, 'utf8');
} catch (error) {
console.log(error);
}
}
export default processReadme;