src/js/cli.js
function setupConfigurationFile(configFilePath) {
    const fileName = '.wistrc.json';

    try {
        let contents = require(configFilePath);
        fs.writeFileSync(fileName, JSON.stringify(contents, null, 2));
        log.info(`Initialized directory with a ${fileName}`)
    } catch (e) {
        console.error(e.message);
        return 1;
    }
    return 0;
}
function setupConfigurationFile(configFilePath) {
    const fileName = '.wistrc.json';

    try {
        let contents = require(configFilePath);
        fs.writeFileSync(fileName, JSON.stringify(contents, null, 2));
        log.info(`Initialized directory with a ${fileName}`)
    } catch (e) {
        console.error(e.message);
        return 1;
    }
    return 0;
}
function setupConfigurationFile ( configFilePath ) { const fileName = '.wistrc.json' ; try { let contents = require ( configFilePath ) ; fs . writeFileSync ( fileName , JSON . stringify ( contents , null , 2 ) ) ; log . info ( ` ${ fileName } ` ) } catch ( e ) { console . error ( e . message ) ; return 1 ; } return 0 ; }
Creates the .wistrc.json file from the contents of the specified file.
@param configFilePath Path to the configuration file.
@returns {boolean} True if the creation of the configuration file succeeds, false if not.
@private
Creates the . wistrc . json file from the contents of the specified file .