From 78d395ad51557d64092e8f46325a55c72678e48d Mon Sep 17 00:00:00 2001 From: Kevin Strider Date: Tue, 17 May 2022 10:03:37 -0700 Subject: [PATCH] loading-custom-plugins.mdx (Creating Plugins - Dynamically Loading Plugins) Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant). Reviewed By: nikoant Differential Revision: D36445433 fbshipit-source-id: 6e0033607cf58d5da51dd9910b40f158ceed84cf --- docs/extending/loading-custom-plugins.mdx | 27 ++++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/extending/loading-custom-plugins.mdx b/docs/extending/loading-custom-plugins.mdx index d68c92d7e..0dfe4d5b7 100644 --- a/docs/extending/loading-custom-plugins.mdx +++ b/docs/extending/loading-custom-plugins.mdx @@ -5,27 +5,29 @@ title: Dynamically Loading Plugins -
- -Inside Facebook, plugins sources are stored and loaded from `~/fbsource/xplat/sonar/desktop/plugins`, -in which case no further configuration is needed. +:::caution +Within Meta, plugins sources are stored and loaded from `~/fbsource/xplat/sonar/desktop/plugins`, in which case no further configuration is needed. If your team uses Flipper plugins that are stored outside `fbsource`, please follow your team specific instructions. - -
+::::
-Flipper loads and runs plugins it finds in a configurable location. The paths searched are specified in `~/.flipper/config.json`. These paths, `pluginPaths`, should contain one folder for each of the plugins it stores. An example config setting and plugin file structure is shown below: +Flipper loads and runs plugins it finds in a configurable location. The paths searched are specified in `~/.flipper/config.json`. These `pluginPaths` should contain one folder for each of the plugins it stores. + +An example config setting and plugin file structure is shown below: `~/.flipper/config.json`: -``` + +```bash { ..., "pluginPaths": ["~/flipper-plugins"] } ``` + Plugin File example structure: + ``` ~ flipper-plugins/ my-plugin/ @@ -36,9 +38,12 @@ Plugin File example structure: -Note: when using `npx flipper-pkg init` for scaffolding, as explained in the [tutorial](../tutorial/intro.mdx) or on the next page, the path should be configured automatically for you in most cases. +:::note +When using `npx flipper-pkg init` for scaffolding, as explained in the [tutorial](../tutorial/intro.mdx) or on the next page, the path should be configured automatically for you in most cases. +::: -Typically, the above setup is only needed if you are developing plugins. -To consume plugins, it is recommended to use one of the existing [distribution mechanisms](plugin-distribution.mdx) instead. +Typically, the above setup is only needed if you are developing plugins. + +To consume plugins, it is recommended to use one of the existing [distribution mechanisms](plugin-distribution.mdx)