lib/utils.js
function readConfigFile(configJSONPath) {
  var confiJSONFullPath = path.join(process.cwd(), configJSONPath);
  
  try{
    var configStr = fs.readFileSync(confiJSONFullPath, {encoding:'utf8'});
    return JSON.parse(configStr);
  } catch (err){
    throw new Error(`Invalid launcher configuration file: ${confiJSONFullPath}
${err.toString()}`);
  }
}
function readConfigFile(configJSONPath) {
  var confiJSONFullPath = path.join(process.cwd(), configJSONPath);
  
  try{
    var configStr = fs.readFileSync(confiJSONFullPath, {encoding:'utf8'});
    return JSON.parse(configStr);
  } catch (err){
    throw new Error(`Invalid launcher configuration file: ${confiJSONFullPath}
${err.toString()}`);
  }
}
function readConfigFile ( configJSONPath ) { var confiJSONFullPath = path . join ( process . cwd ( ) , configJSONPath ) ; try { var configStr = fs . readFileSync ( confiJSONFullPath , { encoding : 'utf8' } ) ; return JSON . parse ( configStr ) ; } catch ( err ) { throw new Error ( ` ${ confiJSONFullPath } ${ err . toString ( ) } ` ) ; } }
When a simple require will reload the targeted file
When a simple require will reload the targeted file