Skip to content

Commit

Permalink
Generate Rails manifest.json
Browse files Browse the repository at this point in the history
Initial steps toward closing [tricknotes/ember-cli-rails#30][#30].

* Generate Rails `manifest.json` when building from Rails.
* Prepend Sprockets path to EmberCLI assets.
* Default fingerprinting to no generate `MD5` hash when building in
  `development`.

[#30]: tricknotes/ember-cli-rails#30
  • Loading branch information
seanpdoyle committed Nov 8, 2015
1 parent 2f2a47e commit 67f7dc5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
master
------

* Generate Rails `manifest.json` when building from Rails.
Prepend Sprockets path to EmberCLI assets.
Default fingerprinting to no generate `MD5` hash when building in
`development`. [#17].

[#17]: https://github.com/rondale-sc/ember-cli-rails-addon/pull/17

0.0.13
------

Expand Down
12 changes: 9 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ module.exports = {
app.options.storeConfigInMeta = false;
app.options.SRI = app.options.SRI || {};
app.options.SRI.enabled = false;
app.options.fingerprint = app.options.fingerprint || {};

if (process.env.DISABLE_FINGERPRINTING === 'true') {
app.options.fingerprint = app.options.fingerprint || {};
app.options.fingerprint.enabled = false;
if (typeof process.env.RAILS_ENV !== 'undefined') {
app.options.fingerprint.enabled = true;
app.options.fingerprint.generateRailsManifest = true;
app.options.fingerprint.prepend = '/assets/' + app.name + '/';

if (app.env !== 'production') {
app.options.fingerprint.customHash = null;
}
}

if (process.env.EXCLUDE_EMBER_ASSETS) {
Expand Down

0 comments on commit 67f7dc5

Please sign in to comment.