diff --git a/README.md b/README.md index 3ca12cd..911b1b3 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,15 @@ So basically, in the plugin UI, you deal with the user interaction (all the butt ## Installation -Very simple to do, just install it via `npm install figmaio` or `yarn add figmaio`. +Very simple to do, just install it via + +```bash +# NPM +npm install --save-dev figmaio + +# Yarn +yarn add -D figmaio +``` ## How to use @@ -56,7 +64,7 @@ io.on('data_update', (data) => { ); ``` -If the data is critical for you and you need to stop and wait for it, you use async for that. +If the data is critical for you and you need to stop and wait for it, you can use async for that. ```js const data = await io.async('data_update') @@ -82,11 +90,10 @@ const cachedData = 'some cached data' switch (figma.command) { /* If we are running the plugin from the Figma plugin menu, it is starting with no command. * And if you are clicking on the editor sidebar plugin command, figma starts the plugin - * with 'edit' value for command, but since my plugin does not directly benefit from it, it just - * sends it with 'start' anyways. + * with with whaveter you specify in the manifest.json */ - case 'edit': + case 'something': if (io) io.send('start', cachedData); break default: