Open iyegoroff opened 5 years ago
Why not simply use multiple folders per linking? Like so
react-native-asset -a ./node_modules/A/Resources ./node_modules/B/Resources
Some context for this issue: https://github.com/iyegoroff/react-native-image-filter-kit/blob/3700e1e45217d169471ff412793f01d2d3d06db2/package.json#L98-L103 https://github.com/iyegoroff/react-native-image-filter-kit/blob/3700e1e45217d169471ff412793f01d2d3d06db2/examples/CustomNativeFilter/local_modules/react-native-image-filter-kit-haze-removal/package.json#L41-L46
I'm using react-native-asset
with separate RN modules - not apps. Each module is responsible for its own resources, so when module "A" is being unlinked I need to remove only resources associated with "A" and left everything else untouched.
Introducing keys sounds like an over-kill for your problem..
So when a developer links react-native-image-filter-kit
, automatically you link for them the resources react-native-image-filter-kit
needs?
If that's the case, adding non-required manifest-path
option might be better!
Instead of using (or creating) their link-assets-manifest.json
, create your own and call it image-filter-kit-link-assets-manifest.json
.
the command line could look like this
npx react-native-asset ./node_modules/A/Resources --manifest-path ./A-link-assets-manifest.json
When I run following commands:
it will end up linking only resources from module
B
and all resources fromA
will be unlinked.So right now is impossible to use react-native-asset properly when developing third party react-native modules whose assets need to be linked. My suggestion is to add a
key
CLI parameter: