Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes [#30]. Depends on [rondale-sc/ember-cli-rails-addon#17][#17]. * Symlink `dist/` directly to Asset Pipeline * Merge EmberCLI-generated `manifest.json` into Sprocket's * `manifest.json`. Since we now defer to EmberCLI, we no longer need to manually resolve asset URLs. * Deletes `EmberCli::AssetResolver` * Improve `bin/setup`, resolve errors. [#30]: #30 [#17]: rondale-sc/ember-cli-rails-addon#17
- Loading branch information
1 parent
2c25935
commit cab4fa4
Showing
14 changed files
with
206 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
rm -rf spec/dummy/my-app | ||
rm -rf spec/dummy/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
module EmberCli | ||
class Manifest | ||
class Null | ||
def fixup! | ||
end | ||
|
||
def files | ||
{} | ||
end | ||
|
||
def assets | ||
{} | ||
end | ||
end | ||
|
||
def initialize(manifest:, app_name:) | ||
@app_name = app_name | ||
@manifest = manifest | ||
@assets = {} | ||
@files = {} | ||
end | ||
|
||
def fixup! | ||
fixup_files! | ||
fixup_assets! | ||
|
||
self | ||
end | ||
|
||
def files | ||
@files | ||
end | ||
|
||
def assets | ||
@assets | ||
end | ||
|
||
private | ||
|
||
def fixup_files! | ||
@manifest.files.each do |(file, info)| | ||
fixed_info = info.merge( | ||
"logical_path" => "#{@app_name}/#{info["logical_path"]}" | ||
) | ||
files["#{@app_name}/assets/#{file}"] = fixed_info | ||
end | ||
end | ||
|
||
def fixup_assets! | ||
@manifest.assets.each do |(file, fingerprinted_file)| | ||
assets["#{@app_name}/assets/#{file}"] = "#{@app_name}/#{fingerprinted_file}" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module EmberCli | ||
class ManifestMerger | ||
def initialize(from:, into:) | ||
@from = from | ||
@into = into | ||
end | ||
|
||
def merge! | ||
@into.assets.merge!(@from.assets) | ||
@into.files.merge!(@from.files) | ||
|
||
@into | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.