All Projects → aarongarciah → figma-plugin-typescript-boilerplate

aarongarciah / figma-plugin-typescript-boilerplate

Licence: MIT license
Figma plugin TypeScript boilerplate to start developing right away

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to figma-plugin-typescript-boilerplate

happy-web
Project built during Rocketseat's Next Level Week #3
Stars: ✭ 19 (-55.81%)
Mutual labels:  eslint, prettier, editorconfig, figma
dva-typescript-antd-starter-kit
A admin dashboard application demo based on antd by typescript and dva
Stars: ✭ 61 (+41.86%)
Mutual labels:  stylelint, eslint, prettier
generator-node
🔧 Yeoman generator for Node projects.
Stars: ✭ 16 (-62.79%)
Mutual labels:  eslint, prettier, editorconfig
react-component-library-lerna
Build your own React component library managed with lerna, presented with storybook and published in private npm registry.
Stars: ✭ 55 (+27.91%)
Mutual labels:  stylelint, eslint, prettier
fe-standard-config-seed
前端通用代码规范自动化接入
Stars: ✭ 18 (-58.14%)
Mutual labels:  stylelint, prettier, editorconfig
React 2048 Game
🎮 A fancy 2048 game build with react, redux best practices.
Stars: ✭ 401 (+832.56%)
Mutual labels:  stylelint, eslint, prettier
Web Configs
Common configurations for building web apps at Shopify
Stars: ✭ 302 (+602.33%)
Mutual labels:  stylelint, eslint, prettier
React Ssr Starter
All have been introduced React environment
Stars: ✭ 20 (-53.49%)
Mutual labels:  stylelint, eslint, prettier
eslint-config-ns
ESLint config ready to be used in multiple projects. Based on Airbnb's code style with prettier, jest and react support.
Stars: ✭ 27 (-37.21%)
Mutual labels:  stylelint, prettier
assistant
🤖 Bring your Figma design & development pipeline to the next level - with design to code, in-design-content-management, component management, tools for faster design
Stars: ✭ 451 (+948.84%)
Mutual labels:  figma, figma-plugin
promotion-web
基于React: v18.x.x/Webpack: v5.x.x/React Router v6.x.x/ Antd: v5..x.x/Fetch Api/ Typescript: v4.x.x 等最新版本进行构建...
Stars: ✭ 374 (+769.77%)
Mutual labels:  stylelint, prettier
spec
🐣 easy to use eslint/stylelint/tslint/prettier/...
Stars: ✭ 60 (+39.53%)
Mutual labels:  stylelint, prettier
Front End Guide
📚 Study guide and introduction to the modern front end stack.
Stars: ✭ 14,073 (+32627.91%)
Mutual labels:  stylelint, eslint
ultimate-hot-boilerplate
🚀 node-react universal app boilerplate with everything on hot reload, SSR, GraphQL, Flow included
Stars: ✭ 35 (-18.6%)
Mutual labels:  stylelint, prettier
Stylelint Prettier
Stylelint plugin for Prettier formatting
Stars: ✭ 188 (+337.21%)
Mutual labels:  stylelint, prettier
figma-responsify
⚡️A Figma plugin to quickly test your designs across multiple device sizes.
Stars: ✭ 51 (+18.6%)
Mutual labels:  figma, figma-plugin
figma-hosted-export
Copy hosted image URLs for any frame inside Figma
Stars: ✭ 39 (-9.3%)
Mutual labels:  figma, figma-plugin
Prettier Stylelint
code > prettier > stylelint > formatted code
Stars: ✭ 162 (+276.74%)
Mutual labels:  stylelint, prettier
flowbite
The most popular and open-source library of Tailwind CSS components
Stars: ✭ 3,727 (+8567.44%)
Mutual labels:  prettier, figma
website-template
静的Webサイト制作を少しモダンにするためのテンプレート
Stars: ✭ 62 (+44.19%)
Mutual labels:  stylelint, prettier

Figma Plugin TypeScript Boilerplate

Figma plugin TypeScript boilerplate to start developing right away.

Actions Status code style: prettier

Quick start

  1. Get the boilerplate choosing one of these methods:

    • Fork this repo.
    • Execute these commands in your terminal:
      mkdir my-plugin
      cd my-plugin
      npx degit https://github.com/aarongarciah/figma-plugin-typescript-boilerplate
    • Download the repo and extract it into your empty plugin folder.
  2. Install dependencies

    npm install
  3. Develop 😄

    npm run dev

You'll need Node and npm installed to use this boilerplate. It has been tested in Node 12, 14, and 16.

Development

To develop a Figma plugin you need to install the Figma desktop app. Learn more in the Figma Plugin docs.

Available commands

Development

  • npm run dev starts the watcher for changes. Modify the files under the src folder and the code will be compiled automatically. Then, go to the Figma app and run your development plugin.

Production build

  • npm run build generates the production build in the dist folder. Important: run this command before releaseing a new version of your plugin. Before generating the build, it checks TypeScript, JavaScript and CSS files for linting errors.

Test

  • npm run test runs tests via Jest. This script runs before build.
  • npm run test:watch runs tests via Jest in watch mode.

Lint

  • npm run lint lint TypeScript and JavaScript files with ESLint and CSS with Stylelint.
  • npm run lint:fix lint and apply automatic fixes to TypeScript, JavaScript and CSS files. This script runs before build.

What this boilerplate does for me?

It's highly recommended to take a look at the Figma plugin development docs before developing a plugin.

A plugin has two parts: a mandatory worker file (a JavaScript file which has access to the Figma document) and an optional UI (an HTML file).

  • Compiles TypeScript.
  • Inlines JS and CSS code into the HTML for the UI. That's because the Figma plugin UI must be a unique HTML file and can't reference any other assets like CSS or JS with relative paths. You can load any external asset (e.g. a file hosted in a CDN) but not relative paths.
  • Provides setup and config for: TypeScript, webpack, ESLint, Stylelint, Prettier, Jest, EditorConfig, etc.
  • Lints and formats the code in a pre-commit hook.
  • Provides boilerplate to send messages between the worker and the UI.
  • Contains a helper to close the UI if you hit the ESC key outside of an input.
  • Testing environment configured with Jest. Every test file under a __tests__ folder or ending with .spec.* or .test.* will be picked up by Jest.
  • Contains a GitHub action to run the build and test commands.

Having problems?

Take a look if someone already opened a similar issue or open a new one.


Roadmap

  • Add FAQ to README.
  • Add bin executables to create templates via npx.

License

MIT

Made with ♥️ by Aarón García Hervás

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].