Below are the steps to get your plugin running
The plugin uses Typescript and NPM, two standard tools in creating JavaScript applications.
First, 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/
Next, install TypeScript using the command:
npm install -g typescript
Finally, in the directory of your plugin, run:
npm install
If you are familiar with JavaScript, TypeScript will look very familiar. In fact, valid JavaScript code is already valid Typescript code.
TypeScript adds type annotations to variables. This allows code editors such as Visual Studio Code to provide information about the Figma API while you are writing code, as well as help catch bugs you previously didn't notice.
For more information, visit https://www.typescriptlang.org/
Using TypeScript requires a compiler to convert TypeScript (code.ts) into JavaScript (code.js) 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 this directory in Visual Studio Code.
- Run
npm run build
. - Open
Figma
, click onMain Menu
, andPlugins
. - Select
Development
andImport Plugins from manifest
. - Add the
manifest.json
from the project folder. - Plugin has been added successfully now.
- Click on
Menu Menu
,Plugins
,Development
and finallyeos-icons
.
To make sure the test files are working correctly after the latest changes, run the following command: npm test
Run the following command to check if there are any linting errors: npm run lint
or npx eslint .
Before submitting a PR/MR make sure your code is compliant with our JS and CSS rules by running: npm run checkFormat
and npx prettier --check .
If you encounter any deploy error in JS try fixing it by running npx prettier --write .
Semantic Release helps in automating the whole package release workflow. semantic-release uses the commit messages to determine the consumer impact of changes in the codebase.
To commit a release follow the link below: https://github.com/EOS-uiux-Solutions/wiki/blob/main/Semantic-Releases.md