react-native-builder-bob
react-native-builder-bob copied to clipboard
feat: add fabric option
Summary
Close https://github.com/callstack/react-native-builder-bob/issues/238
Test plan
- [ ] Turbo module with backward compat (experimental)
- [ ] Turbo module (experimental)
- [ ] Native module
- [ ] Native view
- [ ] JavaScript library
@MateWW @satya164 @atlj

I renamed all files to keep this name convenction ${language}-${type}-${architecture}. Some folders have not been changed, bc it would not make any sense eg kotlin-library, since template for both arch is the same.
Moreover I removed turbomodule, fabricView, newArchitecture properties to avoid any confusion and use only needed ones. Templates has been also updated with the new conditions. If those conditions are not clear, please let me know.
Right now, I am waiting for https://github.com/callstack/react-native-builder-bob/pull/271 to be merged and then I will rebase my branch with the main branch and fix the changes.
Does it make sense to replace "new" with "fabric" and "turbomodule" for views and modules respectively?
Does it make sense to replace "new" with "fabric" and "turbomodule" for views and modules respectively?
I would prefer to stick into that template ${language}-${type}-${architecture}, since it would be much easier to parse those dirs based on chosen options. Moreover we can assume, that fabric is view plus new-arch and turbomodule is module plus new arch. Changing names to turbomodule or fabric would add additional complexity and can be ambiguous in case of mixed (backward compatibility) type
My point is that "new" is new today, but may be old in 3 years 😅 but this is the naming that RN uses as well so I won't protest too much
There is an issue
Issue
./create-react-native-library test ✘ PIPE 5s
✔ What is the name of the npm package? … react-native-test
✔ What is the description for the package? … sdf
✔ What is the name of package author? … Burak
✔ What is the email address for the package author? … [email protected]
✔ What is the URL for the package author? … https://
✔ What is the URL for the repository? … https://
✔ What type of library do you want to develop? › Native fabric view with backward compat (experimental)
create-react-native-library <name>
create a react native library
Options:
--help Show help [boolean]
--version Show version number [boolean]
--slug Name of the npm package [string]
--description Description of the npm package [string]
--author-name Name of the package author [string]
--author-email Email address of the package author [string]
--author-url URL for the package author [string]
--repo-url URL for the repository [string]
--languages Languages you want to use
[choices: "java-objc", "java-swift", "kotlin-objc", "kotlin-swift", "cpp",
"js"]
--type Type of library you want to develop[choices: "module", "view"]
--example Type of example app [choices: "expo", "native"]
[Error: ENOENT: no such file or directory, scandir '/Users/burakguner/kod/react-native-builder-bob/packages/create-react-native-library/templates/java-view-mixed-library'] {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/Users/burakguner/kod/react-native-builder-bob/packages/create-react-native-library/templates/java-view-mixed-library'
}
Steps to reproduce
- run
create-react-native-library - choose
Native fabric view with backward compat (experimental)forWhat type of library do you want to develop?
@satya164 @atlj @MateWW PR is ready for testing
@satya164 Any news when this will be released?
🔜