js-publishing.mdx (Creating Plugins - Publishing)

Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: nikoant

Differential Revision: D36444128

fbshipit-source-id: 1689d36d7ad0b101ea4793a1ac51ba619291b668
This commit is contained in:
Kevin Strider
2022-05-17 10:07:32 -07:00
committed by Facebook GitHub Bot
parent 78d395ad51
commit 76d4f01934

View File

@@ -8,22 +8,21 @@ import Link from '@docusaurus/Link';
<FbInternalOnly> <FbInternalOnly>
The process of releasing plugins is largely automated at Facebook, and described in detail <Link to={useBaseUrl('/docs/extending/fb/desktop-plugin-releases')}>here</Link>. The process of releasing plugins is largely automated at Meta. For details, see the <Link to={useBaseUrl('/docs/extending/fb/desktop-plugin-releases')}>Desktop Plugin Releases</Link> page.
</FbInternalOnly> </FbInternalOnly>
<OssOnly> <OssOnly>
Once you're happy with your plugin and want the world to see it, Once you're happy with your plugin and want the world to see it, you can publish it to npm.
you can publish it to npm. Ensure that your plugin follows these
two rules:
- The package name should to start with "flipper-plugin-". This makes Before publishing, ensure that your plugin complies with the following rules:
it easier to see what the purpose of the package is.
- The package must include the keyword "flipper-plugin".
- Source code of the plugin must be bundled by "flipper-pkg" tool.
A valid example `package.json` could look like this: * The package name should start with 'flipper-plugin-'. This makes it easier to see the purpose of the package.
* The package must include the keyword 'flipper-plugin'.
* Source code of the plugin must be bundled by 'flipper-pkg' tool.
A valid example `package.json` could look like the following:
```json ```json
{ {
@@ -50,28 +49,20 @@ A valid example `package.json` could look like this:
} }
``` ```
When you have confirmed that your `package.json` is correct, When you have confirmed that your `package.json` is correct, run `yarn publish` or `npm publish` and follow the instructions.
run `yarn publish` or `npm publish` and follow the instructions.
## Installing Plugins ## Installing Plugins
Once your plugin is published you can find it, alongside other Once your plugin is published you can find it, alongside other available Flipper plugins, by clicking on 'Manage Plugins...' in the bottom of the left sidebar and selecting the 'Install Plugins' tab.
available Flipper plugins, by clicking on "Manage Plugins..." It may take a few moments for the search index to update and your plugin to appear.
in the bottom of the left sidebar and selecting the
"Install Plugins" tab. It may take a few moments for the
search index to update and your plugin to appear.
<img alt="Install plugins" src={useBaseUrl("img/install-plugins.png")} /> <img alt="Install plugins" src={useBaseUrl("img/install-plugins.png")} />
## Native Distribution ## Native Distribution
Depending on whether the client-side part of your plugin targets Depending on whether the client-side part of your plugin targets Android, iOS or React Native, it's recommended you use the standard package distribution mechanism for the platform.
Android, iOS or React Native, we recommend you use the standard This may be Maven Central, JCenter or GitHub Packages for Android, CocoaPods for iOS and npm or GitHub Packages for React Native.
package distribution mechanism for the platform.
This may be Maven Central, JCenter or GitHub Packages for Android, Make sure to leave setup instructions in the README of your npm package.
CocoaPods for iOS and npm or GitHub Packages for React Native.
Make sure to leave setup instructions in the README of your
npm package.
</OssOnly> </OssOnly>