示例#1
0
function installNextDependency () {
  if (!dependencyNames || 0 === dependencyNames.length) {
    return console.log('> Finished.');
  }

  var dependencyName     = dependencyNames.pop(),
      depencyInstallPath = dependencies[dependencyName].split('@')[0];

  if (!dependencyName.match(/(^aurelia\-|.*?\/aurelia\-.*?$)/)) {
    return installNextDependency();
  }

  notifyOnProgress(dependencyName);

  jspm.install(dependencyName, {summary: true})
    .then(function () {
      notifyOnProgress(dependencyName, true);
      installNextDependency();
    })
    .catch(function (error) {
      jspm.install(dependencyName, depencyInstallPath, {summary: true})
        .then(function () {
          notifyOnProgress(dependencyName, true);
          installNextDependency();
        })
        .catch(function (error) {
          notifyOnProgress(dependencyName, error.toString());
          installNextDependency();
        });
    });
}
示例#2
0
 .catch(function (error) {
   jspm.install(dependencyName, depencyInstallPath, {summary: true})
     .then(function () {
       notifyOnProgress(dependencyName, true);
       installNextDependency();
     })
     .catch(function (error) {
       notifyOnProgress(dependencyName, error.toString());
       installNextDependency();
     });
 });