rondale-sc / ember-cli-rails-addon

27 stars 37 forks source link

Setup via `$ ember addon ember-cli-rails-addon` #18

Closed seanpdoyle closed 8 years ago

seanpdoyle commented 8 years ago

Configure project as a full-blown ember-cli addon.

With this new structure, we can start to expose addon-specific classes accessible from within the host application.

seanpdoyle commented 8 years ago

@rondale-sc what are your thoughts on this?

What was the reasoning behind making this addon only consist of index.js?

In a future PR, I'd love to add an initializer to configure CSRF, a la ember-rails:

$.ajaxPrefilter(function(options, originalOptions, xhr) {
  var token = $('meta[name="csrf-token"]').attr('content');
  xhr.setRequestHeader('X-CSRF-Token', token);
});

The current setup doesn't allow for exposing file from app/

seanpdoyle commented 8 years ago

Oh wow, I'm mistaken.

Including app/initializers/csrf.js in the bare repo is picked up by the host application.

Having said that, what do you think about making this a full-blown addon?

seanpdoyle commented 8 years ago

https://github.com/rondale-sc/ember-cli-rails-addon/pull/19 is an alternative

seanpdoyle commented 8 years ago

Closing for now in an effort to keep the repo slim