tasks/lib/generator.js
function promiseWrap(x) {
  if(x.then && typeof x.then === "function") {
    return x;    
  }
  var deferred = q.defer();
  deferred.resolve(x);
  return deferred.promise;
}
function promiseWrap(x) {
  if(x.then && typeof x.then === "function") {
    return x;    
  }
  var deferred = q.defer();
  deferred.resolve(x);
  return deferred.promise;
}
function promiseWrap ( x ) { if ( x . then && typeof x . then === "function" ) { return x ; } var deferred = q . defer ( ) ; deferred . resolve ( x ) ; return deferred . promise ; }
wrap non-promises in a promise for api simplicity
wrap non - promises in a promise for api simplicity