0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-02-07 19:06:26 -05:00

Updated Creating plugins (markdown)

Liam 2017-02-12 12:43:11 +00:00
parent e0c5a8cb5e
commit 5fef04a3db

@ -3,6 +3,7 @@
1. [Using plugins](#using-plugins) 1. [Using plugins](#using-plugins)
1. [Creating plugins](#creating-plugins) 1. [Creating plugins](#creating-plugins)
1. [Example](#example) 1. [Example](#example)
1. [Boilerplate](#boilerplate)
1. [Versioning](#versioning) 1. [Versioning](#versioning)
1. [Registering](#registering) 1. [Registering](#registering)
1. [Patching](#patching) 1. [Patching](#patching)
@ -22,7 +23,7 @@ To find out how to use and install plugins, see the wiki page on [using plugins]
### Example ### Example
Here is a basic Matter.js plugin boilerplate (a repository will be available soon): Here is a basic Matter.js plugin boilerplate:
```js ```js
var MyPlugin = { var MyPlugin = {
@ -65,6 +66,10 @@ There are some additional optional properties:
While the above boilerplate is given as a guide, any equivalent representations exposing these properties should also work (such as [CommonJS](https://webpack.github.io/docs/commonjs.html) or [ES6 modules](http://exploringjs.com/es6/ch_modules.html)). While the above boilerplate is given as a guide, any equivalent representations exposing these properties should also work (such as [CommonJS](https://webpack.github.io/docs/commonjs.html) or [ES6 modules](http://exploringjs.com/es6/ch_modules.html)).
### Boilerplate
A complete, production ready boilerplate starter project is available at [matter-plugin-boilerplate](https://github.com/liabru/matter-plugin-boilerplate) which you can fork to start your plugin with all the essentials (build, dev, lint, test, doc, release etc.).
### Versioning ### Versioning
Plugins are versioned using the [semver](http://semver.org/) approach, making it easier to specify compatibility. Versions may be specified for plugins themselves, the version of Matter.js they are recommended for and the versions of their dependencies. Plugins are versioned using the [semver](http://semver.org/) approach, making it easier to specify compatibility. Versions may be specified for plugins themselves, the version of Matter.js they are recommended for and the versions of their dependencies.