Pull image-size and locate-file out of atom-plugin and into their own module
@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
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.
That can still be pulled out of locate-file to another intermediate utility file.
The less we re-invent the wheel, the better.
Agree, locate-file could accept file path only