@figlets/helpers
TypeScript icon, indicating that this package has built-in type declarations

0.0.0-alpha.9 • Public • Published

Figlets Helpers

A collection of helpers for Figma plugins.

Usage

Install using the following

npm install @figlets/helpers

Include in your main code

import { ungroup } from '@figlets/helpers'

Testing

For each helper create a unit test by making a file with the same name as the helper in the __tests__ directory. Use Jest's built-in test() function to create a test.

// __tests__/ungroup.test.ts

import { ungroup } from './src/helpers/ungroup';

test('Describe your test', () => {
    
});

Unit tests use a global Figma API stub and can just be referenced as normal

// __tests__/createRectangle.test.ts

var rect = figma.createRectangle()

Follow the Jest Docs for more guidance on writing tests.

Finally to see if your test passes, run:

npm run test

Publishing

Install np for publishing.

npm install --global np

Publish by running np

np

Package Sidebar

Install

npm i @figlets/helpers

Weekly Downloads

1

Version

0.0.0-alpha.9

License

ISC

Unpacked Size

25 kB

Total Files

26

Last publish

Collaborators

  • lukefinch
  • limitlessloop