This plugin template uses Typescript and NPM, and you can find instructions to get the plugin running at https://www.figma.com/plugin-docs/setup/
Install Visual Studio Code
https://code.visualstudio.com/
Install Node.js and NPM
https://nodejs.org/en/download/
Install TypeScript
npm install -g typescript
Install the typings — in the directory of your plugin, get the latest type definitions for the plugin API by running
npm install --save-dev @figma/plugin-typings.
Using TypeScript requires a compiler to convert TypeScript (code.ts) into JavaScript (code.js) for the browser to run.
- Open this directory in Visual Studio Code.
- Compile TypeScript to JavaScript: Run the "Terminal > Run Build Task..." menu item, then select "tsc: watch - tsconfig.json". You will have to do this again every time you reopen Visual Studio Code.
- Run "npm run build" for production.

