Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

Kickstart your awesome Figma plugin with this boilerplate.

License

Notifications You must be signed in to change notification settings

figma-plus/plugin-boilerplate

Repository files navigation

Figma Plugin Boilerplate

Kickstart your awesome Figma plugin with this boilerplate.


Features

  • Modern Javascript (ES6)
  • Tests using Jest
  • Transpiling using Babel and bundle using Rollup
  • Code formatting with Prettier

Code Demo

export default class ExamplePlugin {
  constructor() {
    this.options = [
      "Alert File Name",
      this.main.bind(this),
      null,
      { shift: true, option: true, key: "t" }
    ];

    const { figmaPlugin } = window;
    figmaPlus.createPluginsMenuItem(...this.options);

    window.examplePlugin = this;
  }

  main() {
    const { App, alert } = window;
    const fileName = App.getCurrentFileName();

    alert(fileName);
  }
}

Download & Development

$ git clone https://github.com/figma-plus/plugin-boilerplate
$ yarn install
$ yarn serve
$ yarn test

Build a Distribution Bundle

$ yarn build

You'll see your bundle inside dist directory. Follow the docs instructions to publish it.

License

This project is licensed under the MIT License

About

Kickstart your awesome Figma plugin with this boilerplate.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published