add contributing docs on making a plugin [skip ci] (#542)

* add contributing docs on making a plugin [skip ci]

* fixes [skip ci]
This commit is contained in:
Henry Zhu 2017-05-26 16:24:10 -04:00 committed by GitHub
parent dd83ad6d60
commit 702d413b83

View File

@ -106,3 +106,14 @@ make test
```
From now on Babel will use your local checkout of Babylon for its tests.
## Creating a new plugin (`spec-new`)
> Example: https://github.com/babel/babylon/pull/541
- Create a new issue that describes the proposal (ex: [#538](https://github.com/babel/babylon/issues/538)). Include any relevant information like proposal repo/author, examples, parsing approaches, meeting notes, presentation slides, and more.
- The pull request should include:
- [ ] An update to the [#plugins](https://github.com/babel/babylon#plugins) part of the readme. Add a new entry to that list for the new plugin flag (and link to the proposal)
- [ ] If any new nodes or modifications need to be added to the AST, update [ast/spec.md](https://github.com/babel/babylon/blob/master/ast/spec.md)
- [ ] Make sure you use the `this.hasPlugin("plugin-name-here")` check so that your new plugin code only runs when that flag is turned on (not default behavior)
- [ ] Add failing/passing tests according to spec behavior