Hello! First, thank you for the work on Bob and create-react-native-library.
I've made a few modifications on create-react-native-library to support a tooling (qdk) setup I'm working on.
Summary of Changes:
Added --example none option: Allows creating libraries without an example app.
Added --replace-directory option: Enables overwriting the template in an existing directory, using a similar option name as in the React Native CLI.
Added --skip-git option: Prevents any git commands from running during template creation, also following a naming convention similar to the React Native CLI.
Context:
In my tool (qdk), I have templates for different project structures, and one of these templates uses create-react-native-library to set up a React Native library project. The goal is to generate only the library code, without an example app, without interfering with the project git, and with the flexibility to overwrite an existing directory if it already contains some files.
Thanks for considering these additions!
P.S.: By the way, the options added here follow a similar naming convention to npx @react-native-community/cli init options, for consistency.
I also considered contributing an optional parameter to fix the version of npx @react-native-community/cli@<<VERSION>> init, but for my case, not creating the example app was more beneficial. The vanilla example was giving me errors during generation, even though it was working a few days ago. Fixing the version of create-react-library wasn’t enough.
Additionally, I thought about adding an option to specify the package manager instead of trying to detect it. However, this would require more testing with various package managers, so I decided to hold off on that for now.
Hello! First, thank you for the work on Bob and create-react-native-library.
I've made a few modifications on
create-react-native-library
to support a tooling (qdk) setup I'm working on.Summary of Changes:
--example none
option: Allows creating libraries without an example app.--replace-directory
option: Enables overwriting the template in an existing directory, using a similar option name as in the React Native CLI.--skip-git
option: Prevents any git commands from running during template creation, also following a naming convention similar to the React Native CLI.Context:
In my tool (qdk), I have templates for different project structures, and one of these templates uses
create-react-native-library
to set up a React Native library project. The goal is to generate only the library code, without an example app, without interfering with the project git, and with the flexibility to overwrite an existing directory if it already contains some files.Thanks for considering these additions!
P.S.: By the way, the options added here follow a similar naming convention to
npx @react-native-community/cli init
options, for consistency.I also considered contributing an optional parameter to fix the version of
npx @react-native-community/cli@<<VERSION>> init
, but for my case, not creating the example app was more beneficial. The vanilla example was giving me errors during generation, even though it was working a few days ago. Fixing the version of create-react-library wasn’t enough.Additionally, I thought about adding an option to specify the package manager instead of trying to detect it. However, this would require more testing with various package managers, so I decided to hold off on that for now.