Add publishing/installing docs
Summary: Adding publishing and installation procedure docs to our tutorial to round things off. Reviewed By: jknoxville Differential Revision: D17711800 fbshipit-source-id: 57c848c559208eb2a0ca790a72bcd493730baf16
This commit is contained in:
committed by
Facebook Github Bot
parent
1de1bbaf8a
commit
9bce894b71
55
docs/tutorial/js-publishing.md
Normal file
55
docs/tutorial/js-publishing.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
id: js-publishing
|
||||
title: Publishing your Plugin
|
||||
sidebar_label: Publishing
|
||||
---
|
||||
|
||||
Once you're happy with your plugin and want the world to see it,
|
||||
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
|
||||
it easier to see what the purpose of the package is.
|
||||
- The package must include the keyword "flipper-plugin".
|
||||
|
||||
A valid example `package.json` could look like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "flipper-plugin-example",
|
||||
"version": "1.0.0",
|
||||
"description": "An example for a Flipper plugin",
|
||||
"main": "index.tsx",
|
||||
"license": "MIT",
|
||||
"keywords": ["flipper-plugin"],
|
||||
"title": "Example Plugin",
|
||||
"icon": "apps",
|
||||
"bugs": {
|
||||
"url": "https://github.com/facebook/flipper/issues/"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
When you have confirmed that your `package.json` is correct,
|
||||
run `yarn publish` or `npm publish` and follow the instructions.
|
||||
|
||||
## Installing Plugins
|
||||
|
||||
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. It may take a few moments for the
|
||||
search index to update and your plugin to appear.
|
||||
|
||||

|
||||
|
||||
## Native Distribution
|
||||
|
||||
Depending on whether the client-side part of your plugin targets
|
||||
Android, iOS or React Native, we recommend you use the standard
|
||||
package distribution mechanism for the platform.
|
||||
|
||||
This may be Maven Central, JCenter or GitHub Packages for Android,
|
||||
CocoaPods for iOS and npm or GitHub Packages for React Native.
|
||||
Make sure to leave setup instructions in the README of your
|
||||
npm package.
|
||||
Reference in New Issue
Block a user