Convert to a plugin
See original GitHub issueChanging this project to a react-native plugin, would mean that after installing it locally into project dependencies, you can run react-native create-bridge instead of having global executable.
Would be easier to version, adapt to breaking react-native changes and work across projects.
Since this is not a super documented feature, I would love to send a PR adding this.
Would you be / other users open to having such workflow instead?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:21 (5 by maintainers)
Top Results From Across the Web
ConvertPlug: Home
Convert Plus. All-in-one WordPress Popup plugin that transforms your website into a lead generation powerhouse.
Read more >Convert Pro - The Best Lead Generation Tool for WordPress
Convert Pro is a powerful lead generation tool that converts your website traffic into leads. Get 300% more leads with Convert Pro.
Read more >Converting an existing Java project to a plug-in project - IBM
In the Package Explorer view, right-click the Java project that you want to convert to a plug-in project, and click Configure > Convert...
Read more >Convert Plugin — beets 1.6.0 documentation
The convert plugin lets you convert parts of your collection to a directory of your choice, transcoding audio and embedding album art along...
Read more >Converter for Media – Optimize images | Convert WebP & AVIF
Upload the plugin files to /wp-content/plugins/webp-converter-for-media directory, or install the plugin through the WordPress plugins screen directly.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@andrerfneves I am busy in upcoming days (travelling), so I am happy to help you as much as I can to land this!
To start - it’s really simple.
React Native CLI has a built-in mechanism for detecting plugins. In order to be detected as a plugin, your package has to meet the following criteria:
react-native-*package.jsonof an arbitrary React Native projectrnpm.pluginkey inpackage.json, that points to amainplugin file, e.g.:Path should be relative to your root directory as we will resolve it later.
The plugin entry file (in our context - src/abc.js) has to be a file with
module.exportsthat is either an object or an array of objects. Here’s is a flow type describing its shape. You can see it in action by checkingbundlecommand definition. Options you define there are later used by thereact-nativecli to validate user input and print nice--help. For further reference, you can check other commands, likelinkorrun-iosto see how they define the options.In order to test it, you can just
npm linkyour package to the testing react-native project. Don’t forget to add it topackage.jsondependencies.I absolutely love this idea and would gladly accept a PR! I didn’t even know custom plugins were an option so thank you so much for suggesting this.
I’m going to post on Twitter to see if anyone has any objections, although I don’t think anyone will 😀