emberjs / guides

This repository is DEPRECATED!
https://github.com/ember-learn/guides-source
Other
282 stars 873 forks source link

Convert dep guides to npm #2296

Closed RobbieTheWagner closed 6 years ago

RobbieTheWagner commented 6 years ago

This will eventually resolve #2017, but doesn't quite solve it all just yet.

RobbieTheWagner commented 6 years ago

What do people think about potentially talking about rollup or something, similar to this https://github.com/cafreeman/ember-lodash-fp/pull/1? I know sometimes there are gotchas when you have an npm library and it's not nicely bundled up for you in a dist, and this could potentially allow you to still work with those libs. I don't know a ton about it myself though.

Turbo87 commented 6 years ago

What do people think about potentially talking about rollup

I think what we should do is mention solutions for all existing module types:

sivakumar-kailasam commented 6 years ago

@rwwagner90 Here are few resources,

Here are few more useful resources, https://simplabs.com/blog/2017/02/13/npm-libs-in-ember-cli.html and https://github.com/asakusuma/ember-rollup. Also @Turbo87 wrote https://github.com/Turbo87/ember-cli-rollup.

jenweber commented 6 years ago

I'd love if we had a more detailed guide. However, I recommend that we merge the improvements that have already been made, then iterate on the more involved stuff in a later PR.

@rwwagner90 let me know when it's in a state where you'd feel good about us merging it in. I'm assuming the WIP in the title means "not yet"

RobbieTheWagner commented 6 years ago

I spent many, many hours trying to get underscore, lodash-amd, and other common JS libraries out there that export named AMD to import correctly, but they never would. With that in mind, I removed that example, as others will likely hit the same issues. Would love for someone to help make this more foolproof and tell me how to make it work!

In the interest of incremental improvement, this is done for now, and ready to be reviewed and merged 👍