lib/version.js
function loadConfiguration() {
    let configuration;

    if (isInit()) {
        configuration = jsonReader('./.versionFilesList.json');

        // check configuration file's integrity
        if (!configuration.name || !configuration.currentVersion || !configuration.filesList || !configuration.versionPrefix) {
            sendError('E002');
        }

        // check .versionFilesList.json for missing informations
        if (configuration.name.length === 0 || configuration.currentVersion.length === 0) {
            sendError('E001');
        }
    }
    return configuration;
}
function loadConfiguration() {
    let configuration;

    if (isInit()) {
        configuration = jsonReader('./.versionFilesList.json');

        // check configuration file's integrity
        if (!configuration.name || !configuration.currentVersion || !configuration.filesList || !configuration.versionPrefix) {
            sendError('E002');
        }

        // check .versionFilesList.json for missing informations
        if (configuration.name.length === 0 || configuration.currentVersion.length === 0) {
            sendError('E001');
        }
    }
    return configuration;
}
function loadConfiguration ( ) { let configuration ; if ( isInit ( ) ) { configuration = jsonReader ( './.versionFilesList.json' ) ; // check configuration file's integrity if ( ! configuration . name || ! configuration . currentVersion || ! configuration . filesList || ! configuration . versionPrefix ) { sendError ( 'E002' ) ; } // check .versionFilesList.json for missing informations if ( configuration . name . length === 0 || configuration . currentVersion . length === 0 ) { sendError ( 'E001' ) ; } } return configuration ; }
load configuration file; fallback to global if is not an initialized folder
load configuration file ; fallback to global if is not an initialized folder