react-native-reusables
react-native-reusables copied to clipboard
[ FEATURE ] Custom output path for CLI
Is your feature request related to a problem? Please describe.
As a developer, I want to be able to control which folder the components are copied to.
Currently, you are bound to the ui folder after the path declaration in components.json.
Describe the solution you'd like
I want the ability to just set a custom folder name like ./src/components.
Then the components will be copied directly to ./src/components/alert-dialog.tsx for example.
I also want the ability to set what the import path should be, ~/components for example
Describe alternatives you've considered Using the cli then moving the files to the appropriate folder and updating the import paths.
Additional context Would be nice to have both options as to where it's copied and what the path prefix will be.
Example modification of components.json:
{
"aliases": {
"components": "~/components",
"lib": "~/lib"
},
"paths": {
"components": "./src/components",
"lib": "./src/lib"
}
}