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

Allow addons to be vendored outside of node modules #1370

Merged
merged 1 commit into from
Jul 14, 2014
Merged

Allow addons to be vendored outside of node modules #1370

merged 1 commit into from
Jul 14, 2014

Conversation

bcardarella
Copy link
Contributor

In package.json you can add paths for additional addons

"ember-addon": {
  "paths": [
    "./lib/super-button"
  ]
}

The vendored library must conform to the addon spec, so it must have a
properly declared package.json file as well as its own loader.


addonPkg['ember-addon'] = addonPkg['ember-addon'] || {};
Project.prototype.determineIfAddon = function(addonPath, addonPackages) {
Copy link
Member

Choose a reason for hiding this comment

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

This method name is confusing to me. It seems like it returns a boolean but it actually changes addonPackages. Something like addToPackagesIfAddon is easier to read. I'm sure someone could come up with a better name that what I did though, lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I agree the name sucks, it was late and I couldn't think of anything better. Suggestions welcome! 😄

@jakecraige
Copy link
Member

@bcardarella looks good to me

@stefanpenner
Copy link
Contributor

i can extrapolate some reasons for this, such as a app specific addon that has no purpose being part of NPM. Is this the use-case you invision ?

@bcardarella
Copy link
Contributor Author

Correct, but also for adding the addon through the normal addon
initialization process for testing said addon via integration rather than
manually adding the trees

On Sunday, July 13, 2014, Stefan Penner notifications@github.com wrote:

i can extrapolate some reasons for this, such as a app specific addon that
has no purpose being part of NPM. Is this the use-case you invision ?


Reply to this email directly or view it on GitHub
#1370 (comment)
.


Brian Cardarella
CEO of DockYard
Visit us: http://dockyard.com
Call us: (855) DOCK-YRD
Follow me on Twitter: http://twitter.com/bcardarella
Follow us on Twitter: http://twitter.com/DockYard

return addonPackages;
};

Project.prototype.determineIfAddon = function(addonPath, addonPackages) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you tweak this to addIfAddon?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

In package.json you can add paths for additional addons

```json
"ember-addon": {
  "paths": [
    "./lib/super-button"
  ]
}
```

The vendored library must conform to the addon spec, so it must have a
properly declared `package.json` file as well as its own loader.
rwjblue added a commit that referenced this pull request Jul 14, 2014
Allow addons to be vendored outside of node modules
@rwjblue rwjblue merged commit a55e204 into ember-cli:master Jul 14, 2014
@bcardarella bcardarella deleted the bc-addon-discovery branch July 14, 2014 14:48
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.

None yet

4 participants