Skip to content

Dependencies refactoring#226

Merged
rwjblue merged 4 commits intoember-cli:masterfrom
pangratz:dependencies-refactoring
Oct 22, 2015
Merged

Dependencies refactoring#226
rwjblue merged 4 commits intoember-cli:masterfrom
pangratz:dependencies-refactoring

Conversation

@pangratz
Copy link
Copy Markdown
Contributor

  • allow to specify version instead of full URL for ember, ember-template-compiler and ember-data
  • allow release channels: release, beta and canary
  • add menu item to update version for ember and ember-data via UI

versions-first-try mov


screen shot 2015-10-22 at 20 25 41


screen shot 2015-10-22 at 20 26 09

@alexspeller
Copy link
Copy Markdown
Member

🎉

Comment thread tests/acceptance/dependency-test.js Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you share this files array instead of duplicating in both tests?

@rwjblue
Copy link
Copy Markdown
Member

rwjblue commented Oct 22, 2015

I left a few minor comments, but this is looking awesome!

If the version is specified for "ember", "ember-data" or
"ember-template-compiler" in the twiddle.json, then it is resolved
accordingly:

```json
{
  "dependencies": {
    "ember": "1.13.8",
    "ember-data": "1.13.3",
    "jquery": "http://link.to/jquery.js"
  }
}
```

resolves to

```json
{
  "dependencies": {
    "ember": "http://cdn-url.com/path/to/ember.js",
    "ember-data": "http://cdn-url.com/path/to/ember-data.js",
    "jquery": "http://link.to/jquery.js"
  }
}
```
This method updated the version of a given dependency for the specified
gist:

    emberCli.updateDependencyVersion(gist, 'ember', 'release');
@pangratz
Copy link
Copy Markdown
Contributor Author

Done. Thanks for se review!

Further refactoring so the default twiddle.json uses the latest released Ember version will follow in a subsequent PR...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if this uses {{action versionSelected "ember" version}} you can remove the actions section from app/components/versions-menu.js (the {{action helper accepts a function, which a closure action is).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, now I get it. Never used the closure actions before. Thanks for the lecture 👍 🎓

This adds a new menu "Dependencies" to the menu bar, which shows
selectable versions for ember and ember-data. The versions include the
release channels (release, beta, canary) as well as 3-4 of the latest
releases.

If a version is selected, the corresponding dependency is updated in the
twiddle.json.
@rwjblue
Copy link
Copy Markdown
Member

rwjblue commented Oct 22, 2015

👍

rwjblue added a commit that referenced this pull request Oct 22, 2015
@rwjblue rwjblue merged commit cdbc7c5 into ember-cli:master Oct 22, 2015
@pangratz pangratz deleted the dependencies-refactoring branch October 22, 2015 20:44
@alexspeller alexspeller mentioned this pull request Oct 22, 2015
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