Migrate website to Docusaurus 2
Summary: Docusaurus 2 is quite a lot more powerful than docu 1 it turns out. This should convert the website fully. * [done] Go through migration guide https://v2.docusaurus.io/docs/migrating-from-v1-to-v2 * [done] Convert landing page html * [done] Convert all images to img tags * [done] Convert all .md files to .mdx * [done] Make sure ui-doc generation and including still works * [done] Scan every page visually for sanity check * [done] Make sure footer still works * [done] Make sure search still works * [done] Change all links/ to links/index * [done] Change all links.md to links * [done] Add some custom css to make the navbar look like the old one and darken the footer. Reviewed By: passy Differential Revision: D21158717 fbshipit-source-id: 5f45b711b1b6fd5ece4c5c15c55635c7ebbfb568
This commit is contained in:
committed by
Facebook GitHub Bot
parent
297ca61c49
commit
5f1a0548f5
66
docs/tutorial/js-publishing.mdx
Normal file
66
docs/tutorial/js-publishing.mdx
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
id: js-publishing
|
||||
title: Publishing your Plugin
|
||||
sidebar_label: Publishing
|
||||
---
|
||||
import useBaseUrl from '@docusaurus/useBaseUrl';
|
||||
|
||||
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".
|
||||
- Source code of the plugin must be bundled by "flipper-pkg" tool.
|
||||
|
||||
A valid example `package.json` could look like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "flipper-plugin-sea-mammals",
|
||||
"id": "sea-mammals",
|
||||
"specVersion": 2,
|
||||
"version": "2.0.0",
|
||||
"main": "dist/bundle.js",
|
||||
"flipperBundlerEntry": "src/index.tsx",
|
||||
"license": "MIT",
|
||||
"keywords": ["flipper-plugin"],
|
||||
"icon": "apps",
|
||||
"title": "Sea Mammals",
|
||||
"category": "Example Plugin",
|
||||
"scripts": {
|
||||
"prepack": "flipper-pkg bundle"
|
||||
},
|
||||
"dependencies": {
|
||||
"flipper": "latest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"flipper-pkg": "latest"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
<img alt="Install plugins" src={useBaseUrl("img/install-plugins.png")} />
|
||||
|
||||
## 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