Skip to content

Instantly share code, notes, and snippets.

@harrietty
Created June 19, 2017 08:07
Show Gist options
  • Save harrietty/f4a5433fbb52a6624783f8c660242172 to your computer and use it in GitHub Desktop.
Save harrietty/f4a5433fbb52a6624783f8c660242172 to your computer and use it in GitHub Desktop.
if (stats.isFile()) {
const contents = fs.readFileSync(origFilePath, 'utf8');
// Rename
if (file === '.npmignore') file = '.gitignore';
const writePath = `${CURR_DIR}/${newProjectPath}/${file}`;
fs.writeFileSync(writePath, contents, 'utf8');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment