Conditionally allow assets to be loaded without a manifest. Update README to document available options.#89
Open
evanfarina wants to merge 4 commits into
Open
Conditionally allow assets to be loaded without a manifest. Update README to document available options.#89evanfarina wants to merge 4 commits into
evanfarina wants to merge 4 commits into
Conversation
… option is supplied by the host app or addon
asakusuma
reviewed
Jan 7, 2020
| import require from 'require'; | ||
| import environment from './environment'; | ||
|
|
||
|
|
| * Type: `boolean` | ||
| * If `true`, a <meta> tag which would eventually hold the manifest will not be inserted into the DOM. | ||
|
|
||
| ##### noManifestLookup |
There was a problem hiding this comment.
Does the flag actually not lookup the manifest? Or is it just going to ignore any errors arising from a lookup? What is the default value?
Contributor
Author
There was a problem hiding this comment.
If noManifestLookup is set to true, then there will be no manifest lookup. The default value will be undefined, meaning the manifest will be looked up by default (backwards compatible)
|
|
||
| ### Options | ||
|
|
||
| ##### noManifest |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is meant to address a part of #87 . In short, we are generating a manifest from our external addon because some of the host apps that consume our addon do not use engines nor do they provide their own manifest through other means. In the event that a consuming host app does use ember-engines we run into an issue where a manifest with the engine name is not generated.
This PR does not address the underlying issue but does solve our particular problem which is that our addon should not need to supply a manifest in the first place. I.e we'd like to re-use the lazy-loading functionality that ember-asset-loader provides without having to deal with manifest generation.
I could use a hand from the community to write a test against this new option. My thinking is that we could write a unit test in
asset-manifest-test.jswhich callsgetManifeston theasset-loaderservice and verifies that no manifest was pushed when thenoManifestLookupoption is present. For the life of me I cannot remember how to grab a reference to a service from within a unit test using this old qunit module syntax. I'm also coming up empty-handed in the docs. Boththis.ownerandgetOwner(this)both returnundefined. I'd really appreciate some help here.