mardi 20 février 2018

Ember addAddonsToProject() to dependencies instead of devDependencies

I made a Ember addon and I want to install one of it's dependencies to the target app, so I created a blueprint file which contains a afterInstall hook:

afterInstall() {
  return this.addAddonsToProject({
    packages: [{
      name: 'ember-svg-jar', target: '0.12.0'}
    ]
  });
}

This function adds ember-svg-jar to the devDependencies of my target project, but I would like to add it to the dependencies instead. The only documentation I've found don't write anything about such options, but I found something in the code that could help: extraArgs or bleuprintOptions:

/**
@method addAddonsToProject
@param {Object} options
@return {Promise}
*/
addAddonsToProject(options) {
  let taskOptions = {
    packages: [],
    extraArgs: options.extraArgs || [],
    blueprintOptions: options.blueprintOptions || {},
  };

  ...
}

Can anyone tell me how to solve this problem?




Aucun commentaire:

Enregistrer un commentaire