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

Implicitly add an npm dev dependency on bower #157

Merged
merged 3 commits into from
Nov 12, 2017

Conversation

hjdivad
Copy link
Contributor

@hjdivad hjdivad commented Nov 8, 2017

For scenarios that

  1. do not already have a dependency or dev dependency on bower and
  2. have bower dependencies

Also assert that

  1. npm is ran before bower
  2. if bower is run, a local bower is found

This PR is a continuation of, and supersedes, #151.
Fixes #141
Fixes #150

Copy link
Member

@kategengler kategengler left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

var adapter = this;
debug('Installing bower via npm');
return adapter.run('npm', [].concat(['install', 'bower@^1.3.12']), { cwd: adapter.cwd });
return findEmberPath(adapter.cwd).then(function(emberPath) {
Copy link
Member

Choose a reason for hiding this comment

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

I know you didn't add this, but I wonder if finding bower relative to ember-cli is necessary anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kategengler hmm good point. So presumably the logic would be

  1. run npm before bower
  2. trust that bower exists in PROJECT_ROOT/node_modules/.bin/bower and assert otherwise

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, or we can just leave this since it works, but just thought it worth thinking about

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kategengler leaving it in this PR seems like the right thing to do; it'll be easier to track & revert in a separate PR if it causes issues (although I think you're right that finding it relative to ember-cli would no longer be useful).

@hjdivad hjdivad mentioned this pull request Nov 9, 2017
hjdivad added a commit to ember-m3/ember-m3 that referenced this pull request Nov 9, 2017
I was getting trolled by npm@5 in ember-try, which is fixed in
ember-cli/ember-try#157 but there's no reason
for us to use bower here anyway.
kategengler and others added 2 commits November 12, 2017 10:48
global bower and use if available. Error if neither local or global
bower is available.
For scenarios that
  1. do not already have a dependency or dev dependency on bower and
  2. have bower dependencies

Also assert that
  1. npm is ran before bower
  2. if bower is run, a local bower is found
@rwjblue rwjblue force-pushed the hjdivad/install-bower-via-npm-dep-mgr branch from 2a56af3 to ea8afb7 Compare November 12, 2017 15:52
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

LGTM, I rebased this on top of the changes in #156 which should hopefully fix CI...

@kategengler kategengler mentioned this pull request Nov 12, 2017
@rwjblue
Copy link
Member

rwjblue commented Nov 12, 2017

OK, one of the CI jobs (the client-test job) failed for:

The job exceeded the maximum time limit for jobs, and has been terminated.

Seemed bizarre (since that job took only 12 minutes on the last merge), I restarted it...

@kategengler
Copy link
Member

Ah, most of the scenarios in client-test were only using bower, but with this PR they will each be npm installing, which could account for the huge increase in time. Might be worth rethinking client-test; I think we can remove most of the deprecated commands, at the very least.

@rwjblue
Copy link
Member

rwjblue commented Nov 12, 2017

OK, I removed deprecated commands in 9f10230 (please double check me 😄).

Hoping this shortened things up enough...

@kategengler
Copy link
Member

kategengler commented Nov 12, 2017

So did I in #160

Looks fine, I removed some more in my PR, but I can update it after this merges.

@rwjblue
Copy link
Member

rwjblue commented Nov 12, 2017

Shoot, sorry. I didn’t check my GH notifications before updating...

@rwjblue rwjblue merged commit ccb2a8b into master Nov 12, 2017
@rwjblue rwjblue deleted the hjdivad/install-bower-via-npm-dep-mgr branch November 12, 2017 23:17
@kategengler kategengler mentioned this pull request Nov 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants