How to use the ember-cli/lib/ext/promise.map function in ember-cli

To help you get started, we’ve selected a few ember-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ember-cli-deploy / ember-cli-deploy / lib / tasks / assets.js View on Github external
clearOutputPath: function(outputPath) {
    if (!fs.existsSync(outputPath)) { return Promise.resolve(); }

    var entries = fs.readdirSync(outputPath);
    return Promise.map(entries, function(entry){
      return rimraf(path.join(outputPath, entry));
    });
  },
github ember-cli-deploy / ember-cli-deploy / lib / tasks / assets.js View on Github external
return glob(exclusion, { cwd: dir, matchBase: true }).then(function(entries){
        return Promise.map(entries, function(entry) {
          return rimraf(path.join(dir, entry));
        });
      });
    });
github ember-cli-deploy / ember-cli-deploy / lib / tasks / assets.js View on Github external
deleteExcluded: function(dir, config){
    var exclusions = config.get('assets.exclude');
    return Promise.map(exclusions, function(exclusion){
      return glob(exclusion, { cwd: dir, matchBase: true }).then(function(entries){
        return Promise.map(entries, function(entry) {
          return rimraf(path.join(dir, entry));
        });
      });
    });
  }
});