Skip to content

Commit

Permalink
Correct README
Browse files Browse the repository at this point in the history
* Remove mentions of Sprockets integration.
* Mentions the CSRF initializer
  • Loading branch information
seanpdoyle committed Dec 10, 2015
1 parent fd6d6ba commit 72ac7aa
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,13 @@ EmberCLI applications the Rails applications serve.

This addon is responsible for:

- preprending Sprockets-ready paths to asset URLs. Read the [configuration]
section to learn how to hook into the Asset Pipeline's `asset_host`.
- [exposing an initializer][initializer] for sending Rails' CSRF tokens
- setting expected build variables without the user having to manipulate their
EmberCLI app's `ember-cli-build.js`
- creating lockfiles that `ember-cli-rails` tracks to ensure that requests halt
until EmberCLI has had a chance to fully build
- writing build errors to a file so that `ember-cli-rails` can display them
as Rails errors.

[configuration]: #configuration
[initializer]: app/initializers/ember-cli-rails-addon-csrf.js
[ember-cli-rails]: https://github.com/thoughtbot/ember-cli-rails
[SRI]: https://github.com/jonathanKingston/ember-cli-sri#what-is-it

## Configuration

* `prepend` - This value will be used to generate the proper URL for
EmberCLI-generated assets. For an app named `frontend`, with `prepend` set
to `https://example.com`, the resulting URLs will be prepended with
`https://example.com/assets/frontend`:
* `prefix` - This value corresponds to Rails' [`config.assets.prefix`][prefix].
To match Rails, it defaults to `assets`.

[prefix]: http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets

```js
// ember-cli-build.js

module.exports = function(defaults) {
var app = new EmberApp(defaults, {
'ember-cli-rails': {
prepend: 'https://example.com',
prefix: EmberApp.env() + '/assets',
}
});

// ...
};
```

0 comments on commit 72ac7aa

Please sign in to comment.