Home

Awesome

matter-plugin-boilerplate

A plugin boilerplate for matter.js

Build Status

This project helps you quickly start a production ready plugin. If you just want to build something quickly, check out the minimal plugin example first.

The wiki articles on Using plugins and Creating plugins contain information on the plugin format and provide some best practices. It can also be useful to study the implementation of existing plugins.

Features

Usage

  1. Import or manually clone this repository
  2. Update package.json
  3. Run npm install && npm run build
  4. Implement your plugin code
  5. Create a examples
  6. Write tests
  7. Document the code
  8. Release your plugin (see commands)
  9. Enable Github Pages to serve the demo
  10. Setup Travis CI (optional)
  11. Update the readme

Notes

Running a build will automatically replace strings commented with PLUGIN_NAME, PLUGIN_VERSION and PLUGIN_REPO_URL with constants pulled directly from package.json. Leave these intact unless you wish to manually keep them up to date.

The included plugin is a very basic example that just sets the friction of all bodies to 0 after creation.

If you add more source files, you will need to update the lint, doc and version scripts in package.json.

Commands

All commands are implemented as npm scripts: