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

¿Is that possible to follow a path based in a package namespace? #7

Open
gersonmontenegro opened this issue Apr 9, 2019 · 1 comment

Comments

@gersonmontenegro
Copy link

gersonmontenegro commented Apr 9, 2019

I mean, in react/react-native I do have a package.json inside every namespace:

-src
--assets
----package.json
--components
----package.json
--containers
----package.json
...
And every single package.json has the below (depends of the folder name) definition:

{
  "name": "assets",
  "version": "1.0.0"
}

So, if I need to get an specific asset, instead to use
require('./../assets/logo.png');
I use
require('assets/logo.png');
No matter where (deep) I'm getting this element, I just need to use this friendly syntax.
Is that possible?

@Jack89ita
Copy link
Owner

Hello @gersonmontenegro ,
so sorry for the late response.
I think you can try to achive what you need editing the open-file-from-path.regExp option in the plugin's configuration.
Thank you!

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