diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 584dbfdb8f..eaa84cd98f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -226,7 +226,7 @@ If the test requires a minimum Node version, you can add `minNodeVersion` (must } ``` -#### `@babel/parser` +#### `@babel/parser` (babylon) Writing tests for the babel parser is very similar to the other packages. diff --git a/packages/babel-generator/README.md b/packages/babel-generator/README.md index 2778360bb1..525e63ff20 100644 --- a/packages/babel-generator/README.md +++ b/packages/babel-generator/README.md @@ -1,6 +1,6 @@ # @babel/generator -> Turns a [The Babel Parser AST](https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md) into code. +> Turns the [babel AST](https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md) into code. ## Install @@ -11,7 +11,7 @@ npm install --save-dev @babel/generator ## Usage ```js -import {parse} from 'babylon'; +import {parse} from '@babel/parser'; import generate from '@babel/generator'; const code = 'class Example {}'; @@ -57,7 +57,7 @@ should be the source filenames, and values should be the source content. Here's an example of what that might look like: ```js -import {parse} from 'babylon'; +import {parse} from '@babel/parser'; import generate from '@babel/generator'; const a = 'var a = 1;'; diff --git a/packages/babel-parser/README.md b/packages/babel-parser/README.md index b651691e4c..60014b9dd5 100644 --- a/packages/babel-parser/README.md +++ b/packages/babel-parser/README.md @@ -148,13 +148,13 @@ require("@babel/parser").parse("code", { ### FAQ -#### Will the babel parser support a plugin system? +#### Will the Babel parser support a plugin system? Previous issues: [#1351](https://github.com/babel/babel/issues/1351), [#6694](https://github.com/babel/babel/issues/6694). We currently aren't willing to commit to supporting the API for plugins or the resulting ecosystem (there is already enough work maintaining Babel's own plugin system). It's not clear how to make that API effective, and it would limit our ability to refactor and optimize the codebase. -Our current recommendation for those that want to create their own custom syntax is for users to fork babel parser. +Our current recommendation for those that want to create their own custom syntax is for users to fork the parser. To consume your custom parser, you can add to your `.babelrc` via its npm package name or require it if using JavaScript, diff --git a/packages/babel-parser/ast/spec.md b/packages/babel-parser/ast/spec.md index 77dc40ac1b..abc3a092f4 100644 --- a/packages/babel-parser/ast/spec.md +++ b/packages/babel-parser/ast/spec.md @@ -1,4 +1,4 @@ -These are the core Babylon AST node types. +These are the core @babel/parser (babylon) AST node types. - [Node objects](#node-objects) - [Changes](#changes) @@ -144,7 +144,7 @@ interface Position { # Changes -### Babylon 7 +### @babel/parser (Babylon) v7 Flow: Node renamed from `ExistentialTypeParam` to `ExistsTypeAnnotation` [#322](https://github.com/babel/babylon/pull/322)