Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 2.36 KB

contributing.md

File metadata and controls

69 lines (45 loc) · 2.36 KB

Contribution Guidelines

Contributions are always welcome, no matter how large or small. Before contributing, please read the code of conduct.

Before starting contributing we recommend reading the following guides:

  1. Figma plugins developers page
  2. react-reconciler docs
  3. Yoga Layout docs
  4. React Figma Architecture doc

Collaboration

Issues assigning

For avoiding situations than two contributors started resolving the same issue, recommending:

  1. Make yourself assignee at issue, or, if you haven't rights for this, write a comment at the issue about you started making.
  2. Move issue to "In Progress" column at next board.

Development Chat

Feel free to discuss any problem at the #development channel on our Spectrum.

Developing

Setup

  1. Install Node.js >= 8 and yarn.
  2. Install webpack & dependencies: yarn global add webpack webpack-cli webpack-dev-server
  3. Clone repo: git clone [email protected]:react-figma/react-figma.git
  4. Go to directory: cd react-figma
  5. Install dependencies: yarn

Running examples

Running webpack at watch mode

  1. Change directory to example directory: cd /examples/<example dir>
  2. Run webpack: "npm run webpack:watch"

Plugin adding

  1. Go to Figma dashboard (icon with four squares)
  2. Click Plugins
  3. Click to plus icon beside Development title
  4. Click Click to choose a manifest.json file button
  5. Select /examples/<example dir>/manifest.json file

Plugin launching

  1. Open or create new document
  2. Select Plugins -> Developing -> <plugin name> at the menu

Running linting/tests

  • TypeScript: npm run tsc
  • Jest: npm run test

Before commit pre-commit hook will be launched. It runs prettier and linting/tests.

Pushing changes

  1. Check linting/tests
  2. Check project is can be built npm run build
  3. Make Pull Request with your changes.

Publishing new version to NPM

  1. Bump version in package.json and src/renderer.tsx
  2. Create new release/new tag on GitHub named vx.y.z where x.y.z is new version number