"migrate" command for flipper-pkg tool

Summary: "migrate" command for easy migration of existing Flipper plugins to the specification version 2.

Reviewed By: passy

Differential Revision: D21253913

fbshipit-source-id: 9edb170fbaa10e9c3f670d5d68e69f4f6106c151
This commit is contained in:
Anton Nikolaev
2020-04-28 04:56:45 -07:00
committed by Facebook GitHub Bot
parent deb0daa7f3
commit 1cf3c30b7c
8 changed files with 362 additions and 5 deletions

View File

@@ -132,6 +132,14 @@ Flipper has [tooling for transpiling and bundling](#transpiling-and-bundling) wh
If you need any dependencies in your plugin, you can install them using `yarn add`.
## Migration to the new Plugin Specification
Flipper plugins are defined according to the specification. As with any specification, it is evolving, so new versions of it can be released. Currently Flipper supports plugins defined using version 2 of specification which is described in this page. Previous version of specification is being deprecated, and we encourage all the plugins still using it to migrate.
The main difference of version 2 is that plugins are transpiled and bundled before packaging, while in version 1 this was done in run-time on plugin installation. There are no plugin API changes, so only the `package.json` changes are required to migrate.
The easiest way for migration is using of command `flipper-pkg migrate`. It will automatically migrate your plugin definition to the latest version.
## Development Build
A Flipper development build should be used for plugin debugging. It is also used for Flipper core development and provides the following features: