lib/functions/ignore.js
function addGitIgnore(rootFolder) {

    // If no .gitignore files exists, add one
    const gitignore = path.join(rootFolder, '.gitignore');
    if (!fs.existsSync(gitignore)) {
        fs.writeFileSync(gitignore, gitignoreContent);
    }
}
function addGitIgnore(rootFolder) {

    // If no .gitignore files exists, add one
    const gitignore = path.join(rootFolder, '.gitignore');
    if (!fs.existsSync(gitignore)) {
        fs.writeFileSync(gitignore, gitignoreContent);
    }
}
function addGitIgnore ( rootFolder ) { // If no .gitignore files exists, add one const gitignore = path . join ( rootFolder , '.gitignore' ) ; if ( ! fs . existsSync ( gitignore ) ) { fs . writeFileSync ( gitignore , gitignoreContent ) ; } }
Add a gitignore file if none is present yet

@param {String} rootFolder - Folder to add .gitignore in
@returns {void}
Add a gitignore file if none is present yet