Enable headless mode for the tic-tac-toe plugin
Reviewed By: passy Differential Revision: D36517761 fbshipit-source-id: 0db933d825434da90e814054db531038ea93d610
This commit is contained in:
committed by
Facebook GitHub Bot
parent
17b2e9d375
commit
e639055fc4
@@ -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 = () => {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"version": "0.0.0",
|
||||
"main": "dist/bundle.js",
|
||||
"flipperBundlerEntry": "index.tsx",
|
||||
"headless": true,
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"flipper-plugin"
|
||||
|
||||
Reference in New Issue
Block a user