Move Static Fields to package.json: hermesdebuggerrn
Summary: Flipper reads metadata to show on the sidebar from `package.json` and static fields (`id`, `title`, and `icon`) from `FlipperPlugin` class. If there are fields declared in both file, `FlipperPlugin` class takes precedences. With Sandy (new Flipper plugin API), there is no static field available. In order to prevent unexpected scenario happening when migrating to Sandy, this codemod-ish is applied to plugins that contain static field. The static fields are merged into `package.json` to get the same result. In addition, the static fields are also removed. Reviewed By: rickhanlonii Differential Revision: D22411862 fbshipit-source-id: cb381261f575313110b781c2fddd3a2099e6479a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2ce65c1b3c
commit
f7e7131a7b
@@ -61,10 +61,6 @@ const Container = styled(FlexColumn)({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default class extends FlipperDevicePlugin<State, any, any> {
|
export default class extends FlipperDevicePlugin<State, any, any> {
|
||||||
static title = 'Hermes Debugger';
|
|
||||||
static id = 'Hermesdebuggerrn';
|
|
||||||
static icon = 'code';
|
|
||||||
|
|
||||||
static supportsDevice(device: Device) {
|
static supportsDevice(device: Device) {
|
||||||
return !device.isArchived && device.os === 'Metro';
|
return !device.isArchived && device.os === 'Metro';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://fbflipper.com/schemas/plugin-package/v2.json",
|
"$schema": "https://fbflipper.com/schemas/plugin-package/v2.json",
|
||||||
"name": "flipper-plugin-hermesdebuggerrn",
|
"name": "flipper-plugin-hermesdebuggerrn",
|
||||||
"id": "flipper-plugin-hermesdebuggerrn",
|
"id": "Hermesdebuggerrn",
|
||||||
"version": "0.49.0",
|
"version": "0.49.0",
|
||||||
"main": "dist/bundle.js",
|
"main": "dist/bundle.js",
|
||||||
"flipperBundlerEntry": "index.tsx",
|
"flipperBundlerEntry": "index.tsx",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"title": "Hermes Debugger (RN)",
|
"title": "Hermes Debugger (RN)",
|
||||||
"icon": "apps",
|
"icon": "code",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"flipper-plugin"
|
"flipper-plugin"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user