react-native-builder-bob icon indicating copy to clipboard operation
react-native-builder-bob copied to clipboard

feat: add fabric option

Open troZee opened this issue 3 years ago • 5 comments

Summary

Close https://github.com/callstack/react-native-builder-bob/issues/238

Screenshot 2022-09-06 at 15 25 48

Test plan

  • [ ] Turbo module with backward compat (experimental)
  • [ ] Turbo module (experimental)
  • [ ] Native module
  • [ ] Native view
  • [ ] JavaScript library

troZee avatar Sep 06 '22 13:09 troZee

@MateWW @satya164 @atlj rename

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.

troZee avatar Sep 08 '22 10:09 troZee

Does it make sense to replace "new" with "fabric" and "turbomodule" for views and modules respectively?

thymikee avatar Sep 08 '22 12:09 thymikee

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

troZee avatar Sep 08 '22 13:09 troZee

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

thymikee avatar Sep 08 '22 13:09 thymikee

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

  1. run create-react-native-library
  2. choose Native fabric view with backward compat (experimental) for What type of library do you want to develop?

atlj avatar Sep 09 '22 09:09 atlj

@satya164 @atlj @MateWW PR is ready for testing

troZee avatar Oct 24 '22 13:10 troZee

@satya164 Any news when this will be released?

migueldaipre avatar Oct 27 '22 16:10 migueldaipre

🔜

thymikee avatar Oct 27 '22 17:10 thymikee