@schemifyjs/schematics
Version:
Reusable schematics for scaffolding SchemifyJS projects.
12 lines (11 loc) • 430 B
JavaScript
import fs from 'fs-extra';
import path from 'path';
import chalk from 'chalk';
export async function renameGitignore(targetDir) {
const filePath = path.join(targetDir, 'gitignore');
const newPath = path.join(targetDir, '.gitignore');
if (await fs.pathExists(filePath)) {
await fs.move(filePath, newPath, { overwrite: true });
console.log(chalk.yellow('📝 Renamed gitignore → .gitignore'));
}
}