The live version of the JACoB Figma Plugin is available here: https://www.figma.com/community/plugin/1326684504185921461/jacob-ai-codegen-connector
This repo is for developers who are looking to self-host JACoB and use the Figma Plugin within their local environment.
This plugin is built with Create Figma Plugin. It is a combination of the preact-resizable and preact-tailwind templates.
Update the 'API_URL' variable in the 'constants.ts' file with the endpoint for the JACoB API. For local development, the value should be:
export const API_URL = 'http://localhost:3000/api'
Update the 'baseUrl' variable in the 'authPageRedirect.ts' file with the url for JACoB. For local development, the value should be:
const baseUrl = "http://localhost:3000";
To build the plugin:
$ npm run build
This will generate a manifest.json
file and a build/
directory containing the JavaScript bundle(s) for the plugin.
To watch for code changes and rebuild the plugin automatically:
$ npm run watch
- In the Figma desktop app, open a Figma document.
- Search for and run
Import plugin from manifest…
via the Quick Actions search bar. - Select the
manifest.json
file that was generated by thebuild
script.
Use console.log
statements to inspect values in your code.
To open the developer console, search for and run Show/Hide Console
via the Quick Actions search bar.
Licensed under the Apache License 2.0. See the LICENSE file for more details.
Official docs and code samples from Figma: