-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow scoped file names #50
Comments
I tried to patch-package this addon in my local and try something similar for this problem. I did something like this:
So the meta generated is w.r.t the entire destinationDirPath. But here's the problem, if
If this is acceptable, I can send a PR of what is working for me perfectly other than this scenario. @simonihmig Thoughts? |
On the other hand, I read from here => https://github.com/kaliber5/ember-responsive-image#options that |
Closed by #115 |
When multiple directories (say
a
andb
) are set up in the addons config, having a filefoo.jpg
in both will not work, as the image is referred to only with its filename. I.e.<ResponsiveImage image="foo.jpg"/>
is ambiguous. With many images in different configurations, it might be easily possible to get into name clashes.We should support referencing files with a path, to add a scope to them.
What about something like this:
This would lead to the following file handling:
assets/images/responsive/foo.jpg
would be written toassets/images/generated/foo***.jpg
and referenced as<ResponsiveImage image="foo.jpg"/>
, using the default image settingsassets/images/responsive/a/foo.jpg
would be written toassets/images/generated/a/foo***.jpg
and referenced as<ResponsiveImage image="a/foo.jpg"/>
, using the specific image settingsassets/images/responsive/b/foo.jpg
would be written toassets/images/generated/b/foo***.jpg
and referenced as<ResponsiveImage image="b/foo.jpg"/>
, using the specific image settingsInstead of assigning configurations by folder, we could also do that by pattern matching. I.e. instead of
dir: 'a'
in config item, we could dopattern: 'a/*'
, or any other pattern to allow different settings within a single directory, e.g.pattern: '**/*-small.jpg'
.@andreasschacht thoughts?
The text was updated successfully, but these errors were encountered: