GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tode-analytics/create-tode-plugin: npm create @tode-sdk: a Figma plugin project (React, Vue, Svelte or vanilla × Vite or esbuild) with tode analytics wired in

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
cli
cli
 
 
scripts
scripts
 
 
template-repo
template-repo
 
 
templates
templates
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

@tode-sdk/create

Scaffold a Figma plugin with tode analytics already wired in.

npm create @tode-sdk@latest my-plugin

Pick a UI framework and a bundler; the rest is set up: manifest.json with the network access and permission tode needs, tode.init in the main thread, the adapter in the UI, two example events, tests, lint, CI, and the files a coding agent reads to work in the project.

Vite esbuild
React --framework react --bundler vite (default) --framework react --bundler esbuild
Vue --framework vue --bundler vite --framework vue --bundler esbuild
Svelte --framework svelte --bundler vite --framework svelte --bundler esbuild
Vanilla TS --framework vanilla --bundler vite --framework vanilla --bundler esbuild

Every cell is generated and built in CI on every push.

Flags

npm create @tode-sdk@latest [dir] -- [options]
  --framework <react|vue|svelte|vanilla>
  --bundler   <vite|esbuild>
  --name      "Plugin name"
  --api-key   <key>          writes .env
  --pm        <npm|pnpm|yarn|bun>
  --no-install  --no-git  -y/--yes  --list  --help  --version

Without a TTY (CI, agents) nothing is asked: pass the flags or --yes. --list prints the matrix as JSON.

What you get

manifest.json           Figma reads this; edit it directly
src/main/               plugin sandbox: showUI, handlers, settings, tode.init
src/ui/                 the UI; framework app + tode adapter + a mock for browser preview
src/shared/messages.ts  typed messages between the two
scripts/                build, preview, manifest check
AGENTS.md, CLAUDE.md    the project explained to coding agents
skills/figma-plugin-tode/SKILL.md   sandbox and tracking rules

npm run dev watch-builds into dist/; import manifest.json in Figma Desktop and turn on "Hot reload plugin". npm run check is the one command that says whether the project is fine. npm run preview opens the UI in a browser with the main thread mocked.

Without a tode account

The plugin runs and sends nothing. Add TODE_API_KEY to .env later (free plan at app.usetode.dev).

The flattened template

tode-analytics/figma-plugin-template-with-tode is the React + Vite output of this generator, regenerated on every release. Use it with "Use this template" or npx degit tode-analytics/figma-plugin-template-with-tode my-plugin.

How the generator works

templates/base → templates/bundler/<b> → templates/framework/<f> → templates/combo/<f>-<b>, later layers win. JSON files are deep-merged (arrays concatenated, scalars overwritten), everything else is copied whole, __TPL_*__ tokens are substituted (see cli/src/matrix.ts), and a leading _ in a path segment becomes .. Dependency versions are pinned in the layer package.json files; npm run bump-deps prints the ones that are behind.

Ideas borrowed with thanks from plugma (layered templates, manifest in the root, main/ui split) and create-figma-plugin (typed events, the settings helper, esbuild targets). MIT.

About

npm create @tode-sdk: a Figma plugin project (React, Vue, Svelte or vanilla × Vite or esbuild) with tode analytics wired in

usetode.dev/guides/figma-plugin-template

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.