Awesome
About Plugin
Randomiser is a Figma plugin that elevates design exploration by effortlessly introducing randomness to size, position, and color of the design elements.
Setting up the Plugin
Follow these steps to get the plugin running on your machine:
Prerequisites
- Download Node.js., which comes with NPM. This will allow you to install TypeScript and other libraries. You can find the download link here: https://nodejs.org/en/download/
- Install TypeScript using the following command:
npm install -g typescript
Install Dependencies
In the plugin directory, run the following command to get the latest type definitions for the plugin API:
npm install --save-dev @figma/plugin-typings
Compiling TypeScript
TypeScript requires a compiler to convert .ts
files into .js
files for the browser to run.
We recommend writing TypeScript code using Visual Studio Code:
- Download Visual Studio Code if you haven't already: https://code.visualstudio.com/.
- Open the plugin directory in Visual Studio Code.
- Compile TypeScript to JavaScript: Run the "Terminal > Run Build Task..." menu item, then select "npm: watch". You will have to do this again every time you reopen Visual Studio Code.
Visual Studio Code will regenerate the JavaScript file every time you save.