forked from fabricjs/fabric.js
-
Notifications
You must be signed in to change notification settings - Fork 0
How to contribute to Fabric
kangax edited this page Aug 12, 2012
·
17 revisions
If you think you found a bug in Fabric, please create a jsfiddle with a minimal test case, demonstrating the bug. You can then create an issue with the link to jsfiddle.
Please open a pull request (see "Using pull requests") with a fix.
Before filing a bug or adding a patch, you might want to get familiar with Fabric's architecture:
- http://www.slideshare.net/kangax/fabric-falsy-values-8067834
- http://www.slideshare.net/kangax/fabricjs-building-acanvaslibrarybk
- https://github.com/kangax/fabric.js/wiki/How-fabric-canvas-layering-works
gotchas:
or just general notes:
- 2 spaces, no tabs
- semicolons required
- explicit blocks
- camelCase
-
fabric.document
/fabric.window
(not justdocument
/window
)
- Install Node.js
- Build distribution file
node build.js
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
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.