Skip to content

Commit

Permalink
style: renamed deferral to async
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Mar 7, 2017
1 parent e52f750 commit 4521221
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scripts/npm/nodeDependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
function install (context) {
// set properties
var q = context.requireCordovaModule('q')
var deferral = new q.defer() // eslint-disable-line
var async = new q.defer() // eslint-disable-line
var installFlagLocation = path.join(context.opts.projectRoot, 'plugins', context.opts.plugin.id, installFlagName)
var dependencies = require(path.join(context.opts.projectRoot, 'plugins', context.opts.plugin.id, 'package.json')).dependencies

Expand All @@ -25,7 +25,7 @@

// install node modules
var modules = getNodeModulesToInstall(dependencies)
if (modules.length === 0) return deferral.promise
if (modules.length === 0) return async.promise

installNodeModules(modules, function (err) {
if (err) {
Expand All @@ -36,11 +36,11 @@
setPackageInstalled(installFlagLocation)
removeEtcDirectory()
}
deferral.resolve()
async.resolve()
})

// wait until callbacks from the all the npm install complete
return deferral.promise
return async.promise
}

// installs the node modules via npm install one at a time
Expand Down

0 comments on commit 4521221

Please sign in to comment.