From 702d413b83ca09ccddf2cf1505049e065167468f Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Fri, 26 May 2017 16:24:10 -0400 Subject: [PATCH] add contributing docs on making a plugin [skip ci] (#542) * add contributing docs on making a plugin [skip ci] * fixes [skip ci] --- CONTRIBUTING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eefd2e2706..326c383446 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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