Enable headless mode for the tic-tac-toe plugin

Reviewed By: passy

Differential Revision: D36517761

fbshipit-source-id: 0db933d825434da90e814054db531038ea93d610
This commit is contained in:
Andrey Goncharov
2022-05-23 03:38:23 -07:00
committed by Facebook GitHub Bot
parent 17b2e9d375
commit e639055fc4
2 changed files with 10 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ import {
styled,
theme,
Layout,
FlipperPluginInstance,
} from 'flipper-plugin';
type Player = ' ' | 'X' | 'O';
@@ -120,6 +121,14 @@ export const plugin = (client: PluginClient<Events, Methods>) => {
};
};
export const API = (pluginInstance: FlipperPluginInstance<typeof plugin>) => {
return {
makeMove: pluginInstance.makeMove,
reset: pluginInstance.reset,
state: pluginInstance.state,
};
};
const desktopPlayer = 'O';
export const Component = () => {

View File

@@ -5,6 +5,7 @@
"version": "0.0.0",
"main": "dist/bundle.js",
"flipperBundlerEntry": "index.tsx",
"headless": true,
"license": "MIT",
"keywords": [
"flipper-plugin"