Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only install ember-cli-shims if it doesn't exist #270

Merged
merged 1 commit into from Jun 16, 2017

Conversation

jrjohnson
Copy link
Contributor

Changes proposed in this pull request

Check first to see if ember-cli-shims is installed as a package (which
it is after ember-cli 2.11.

Closes #254

Some caveats:

  1. This is the only idea I had for preventing an unnecessary bower install. It might be a bad one.
  2. I don't have any knowledge of the options parameter I used to detect the installation of ember-cli-shims - passing it in is part of the API docs at https://ember-cli.com/api/classes/Blueprint.html but there are no details.
  3. I don't think there is a way to test the blueprint.

Check first to see if ember-cli-shims is installed as a package (which
it is after ember-cli 2.11.
afterInstall: function() {
return this.addBowerPackageToProject('ember-cli-shims', '~0.1.1');
afterInstall: function(options) {
if (!('ember-cli-shims' in options.project.addonPackages)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this to using indexOf to support legacy node?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addonPackages is an object with each package as a key and I think the in operator for a key of an object works all the way back to ES3. I'm willing to be wrong about that though - just let me know.

@rtablada
Copy link
Contributor

rtablada commented Jun 13, 2017 via email

@poteto poteto merged commit 2212afa into DockYard:master Jun 16, 2017
@jrjohnson jrjohnson deleted the limit-bower branch June 16, 2017 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants