feat: add `modulePath` option to nitrogen
This PR adds a new option, --modulePath, which will let you specify where the module (podspec) is located and use this path to autolink the native files. Also adds "CLI Options" section to the Nitrogen docs
Why
When using the --out option on nitrogen the CLI assumes the Module.podspec file is at the root of the project, which results in the generated files not being auto linked when using a custom folder structure in a project.
Let's say I run bunx nitro-codegen ./modules --out=modules/generated
my-project
ios/
android/
src/
modules/
generated/
ios/
MyModule+autolinking.rb
....
MyModule.podspec
package.json
...
This will generate a MyModule+autolinking.rb file that will look for the generated files at path modules/generated/**/*.{*}, and since MyModule.podspec is at modules/ it can't find the directory modules relative to it. This will result in the files not being added to source_files, public_header_files, and private_header_files of the spec.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| nitro-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Feb 27, 2025 7:57pm |