kurko / ember-json-api

JSON API adapter for Ember Data.
MIT License
254 stars 62 forks source link

Ember CLI addon conversion #39

Closed csantero closed 10 years ago

csantero commented 10 years ago

This is my WIP to convert this library into an Ember CLI addon. I was able to convert the source and tests fine, but what is notably missing is backwards compatibility for non-Ember CLI apps that are using ember-json-api as a bower dependency. I'm not sure how to graft the existing broccoli build process onto the Ember CLI addon infrastructure.

locks commented 10 years ago

@csantero Are you sure all this work was necessary? I asked advice on how to turn a library of mine into an ember addon and I was pointed the following resources: https://speakerdeck.com/rwjblue/ember-cli-addons https://github.com/jamesarosen/ember-cpm/pull/45

csantero commented 10 years ago

@locks I think there is value from an addon buying in to the ember-cli addon conventions, mainly being barrier to entry for new developers. I figured that since this library is kind of small, the conversion pain for adopting the conventions would be relatively low.

That said, the ember-cpm approach seems like a decent middle ground. I'll submit another PR that leaves most things in the same place and preserves the existing build process.

locks commented 10 years ago

@csantero I'd let the maintainers decide if they want to merge this PR or if it's too much of a change, you did a lot of good work ;)

csantero commented 10 years ago

Haha, alright =). Reopening, submitted alternative solution in #40.

kurko commented 10 years ago

So, the thing I don't feel comfortable with in this PR is that it prevents people from using it with bower. I assume not everyone is using Ember CLI, so this would counter-productive. Please, correct me if I am wrong.

Even removing no_loader.js is sort of bad because you can't build it anymore and develop it locally without conflict with the app's loader.js.

csantero commented 10 years ago

@kurko You're right that this PR would prevent people from using ember-json-api through bower. I'm leaning more toward the other PR at this point. The first task is getting basic addon functionality working. With that in place, we can always migrate parts of the project to align with the standard ember-cli addon layout at a later date, while continuing to maintain backward compatibility for the bower folks.

kurko commented 10 years ago

Right. So let's close this one and focus on the other PR.

By the way, awesome work here.