index.js
function () {
  var deferred = Q.defer();
  var parser = new xml2js.Parser();
  fs.readFile(settings.CONFIG_FILE, function (err, data) {
    if (err) {
      deferred.reject(err);
    }
    parser.parseString(data, function (err, result) {
      if (err) {
        deferred.reject(err);
      }
      var projectName = result.widget.name[0];
      deferred.resolve(projectName);
    });
  });
  return deferred.promise;
}
function () {
  var deferred = Q.defer();
  var parser = new xml2js.Parser();
  fs.readFile(settings.CONFIG_FILE, function (err, data) {
    if (err) {
      deferred.reject(err);
    }
    parser.parseString(data, function (err, result) {
      if (err) {
        deferred.reject(err);
      }
      var projectName = result.widget.name[0];
      deferred.resolve(projectName);
    });
  });
  return deferred.promise;
}
function ( ) { var deferred = Q . defer ( ) ; var parser = new xml2js . Parser ( ) ; fs . readFile ( settings . CONFIG_FILE , function ( err , data ) { if ( err ) { deferred . reject ( err ) ; } parser . parseString ( data , function ( err , result ) { if ( err ) { deferred . reject ( err ) ; } var projectName = result . widget . name [ 0 ] ; deferred . resolve ( projectName ) ; } ) ; } ) ; return deferred . promise ; }
read the config file and get the project name

@return {Promise} resolves to a string - the project's name
read the config file and get the project name