Wondering what’s next for npm?Check out our public roadmap! »

@mattdesl/fika

1.1.1 • Public • Published

fika

A small figma plugin generator using Parcel.

1. Install

npm install @mattdesl/fika -g

2. Create an Empty Folder

Create and move into an empty folder where you'd like to keep all your plugins:

mkdir figma-plugins
cd figma-plugins

Or, you can create a new folder repository per plugin.

3. Generate a new Plugin

The following will generate ./src/my-plugin and start a development server.

fika my-plugin --init

Or, omit the --init flag to continue developing an existing plugin.

Other examples:

# use a different name when generating the plugin 
fika some-plugin --init --name="My Cool Plugin"
 
# generate a plugin without HTML 
fika my-cool-plugin --init --no-ui
 
# continue developing an existing plugin 
fika my-existing-plugin
 
# use a different root folder than ./src 
fika lib/my-plugin --init

You can open http://localhost:9966/ to test your UI, and edit the files inside ./src/my-plugin to see them reload.

4. Test Build in Figma

Once you've generated a ./dist folder, open a project in Figma Desktop, select Menu > Plugins > Development > New Plugin. Click "Choose a manifest.json" and find the manifest.json file in ./dist/my-plugin/manifest.json. (notice dist not src).

Now you can run the plugin via Menu or Right Click > Plugins > Image Palette. You can also open the Console via that context menu, and re-run the last plugin via Cmd + Option + P.

5. Build for Production

Kill the server and run the following to build a smaller and more optimized production plugin:

fika my-plugin --build

This will generate assets into ./dist/my-plugin. You can then publish your plugin!

License

MIT, see LICENSE.md for details.

Keywords

none

Install

npm i @mattdesl/fika

DownloadsWeekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

21.2 kB

Total Files

10

Last publish

Collaborators

  • avatar