lib/config.js
function exportConfig(optionalPath) {
    // Read content of the global config file
    let config = fs.readFileSync(configFile, 'utf8');

    if (!config) {
        config = '{}';
    }

    // Create file or print output
    if (optionalPath) {
        process.stdout.write(`Exporting your config to '${optionalPath}'`);

        // Create a file in the specified location
        const file = {
            name: optionalPath,
            source: config,
        };
        createFile(file);
        checkbox.display('green');
    } else {
        console.log(config);
    }
}
function exportConfig(optionalPath) {
    // Read content of the global config file
    let config = fs.readFileSync(configFile, 'utf8');

    if (!config) {
        config = '{}';
    }

    // Create file or print output
    if (optionalPath) {
        process.stdout.write(`Exporting your config to '${optionalPath}'`);

        // Create a file in the specified location
        const file = {
            name: optionalPath,
            source: config,
        };
        createFile(file);
        checkbox.display('green');
    } else {
        console.log(config);
    }
}
function exportConfig ( optionalPath ) { // Read content of the global config file let config = fs . readFileSync ( configFile , 'utf8' ) ; if ( ! config ) { config = '{}' ; } // Create file or print output if ( optionalPath ) { process . stdout . write ( ` ${ optionalPath } ` ) ; // Create a file in the specified location const file = { name : optionalPath , source : config , } ; createFile ( file ) ; checkbox . display ( 'green' ) ; } else { console . log ( config ) ; } }
Export a config file

@param {String} optionalPath - The path where we will export the config to
@returns {void}
Export a config file