Skip to content
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

Pull image-size and locate-file out of atom-plugin and into their own module #21

Open
ramya-rao-a opened this issue Jun 7, 2017 · 3 comments

Comments

@ramya-rao-a
Copy link

@sergeche

I was looking at your implementation of "Update Image Size" in the atom plugin.

The image-size file has no editor specific code

Any reason the default function in locate-file supports both basepath or the editor?
If it is made to take just the base path, then this file will not have any editor specific code either

And so, both these files can be pulled out into a separate module.

This will make the adaption easier for other editors

@sergeche
Copy link
Member

sergeche commented Jun 7, 2017

Don’t remember for sure, but the idea was to provide a custom base path somehow (config, project settings) to locate files. For example, say you edit /src/my/component.html file that has /images/pic.png, which is located in /www/assets/images/pic.png. You could add /www/assets as a search path.

@ramya-rao-a
Copy link
Author

That can still be pulled out of locate-file to another intermediate utility file.

The less we re-invent the wheel, the better.

@sergeche
Copy link
Member

sergeche commented Jun 7, 2017

Agree, locate-file could accept file path only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants