Change config to support different configurations per file pattern #115
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 changes the configuration options considerably. Instead of having one or multiple configurations based on a dedicated folder (where no other files than those to be processed according to that configuration must be present), this is not based on include (and exclude) globs.
This way you are flexible in your file layout, you can have all images in one folder for example, and still provide different configurations for every file (or subset of files).
Besides the configuraton change, another breaking change is now the requirement to provide the full file path to the
<ResponsiveImage>
component, like<ResponsiveImage @image="assets/images/landscape.jpg">
. But this removes the ambiguity when having multiple images with the same name but in different folders, and also is more aligned to a plan HTML image tag (<img src="assets/images/landscape.jpg">
).Closes #50 and #54.
/cc @andreasschacht @lolmaus