Skip to content

How to contribute to Fabric

kangax edited this page Aug 12, 2012 · 17 revisions

Filing bugs

If you think you found a bug in Fabric, please create a jsfiddle with a minimal test case, demonstrating the bug. Create an issue with the link to jsfiddle.

Patching a bug or adding feature

Please open a pull request (see "Using pull requests") with a fix.

Fabric architecture

Code style

  • 2 spaces, no tabs
  • semicolons required
  • explicit blocks
  • camelCase

Building fabric

  1. Install Node.js
  2. Build distribution file
node build.js

Testing fabric

When fixing bugs or adding new features, it's highly advisable to add a corresponding unit test (under /test/unit). You can run entire test suite like so (from within Fabric's root directory):

> npm test

Adding documentation

Fabric uses JSDoc-style documentation, right in the code. After adding or updating certain documentation, please open a pull request. You can also add or update a page on Fabric's github wiki.