Minor improvements to grammar, verbiage and others (#5764) [skip ci]
This commit is contained in:
parent
8772e7fb89
commit
4ce24c041a
@ -27,20 +27,20 @@ Contributions are always welcome, no matter how large or small.
|
||||
|
||||
- If you aren't just making a documentation change, you'll probably want to learn a bit about a few topics.
|
||||
- [ASTs](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (Abstract Syntax Tree): The Babel AST [spec](https://github.com/babel/babylon/blob/master/ast/spec.md) is a bit different from [ESTree](https://github.com/estree/estree). The differences are listed [here](https://github.com/babel/babylon#output).
|
||||
- This repository's [`/doc`](https://github.com/babel/babel/tree/master/doc) directory for notes on Babel's internals
|
||||
- This repository [`/doc`](https://github.com/babel/babel/tree/master/doc) contains the notes on Babel's internals
|
||||
- Check out [the Babel Plugin Handbook](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-plugin-handbook) - core plugins are written the same way as any other plugin!
|
||||
- Check out [AST Explorer](http://astexplorer.net/#/scUfOmVOG5) to learn more about ASTs or make your own plugin in the browser
|
||||
- When you feel ready to finally jump into the babel source code a good start is to look out for issues which are labeled with [help-wanted](https://github.com/babel/babel/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) and/or [beginner-friendly](https://github.com/babel/babel/issues?q=is%3Aissue+is%3Aopen+label%3A%22beginner-friendly%22).
|
||||
- When you feel ready to finally jump into the Babel source code, a good start is to look out for issues which are labeled with [help-wanted](https://github.com/babel/babel/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) and/or [beginner-friendly](https://github.com/babel/babel/issues?q=is%3Aissue+is%3Aopen+label%3A%22beginner-friendly%22).
|
||||
|
||||
## Chat
|
||||
|
||||
Feel free to check out the `#discussion`/`#development` channels on our [slack](https://slack.babeljs.io). Some of us are always online to chat!
|
||||
Feel free to check out the `#discussion`/`#development` channels on our [Slack](https://slack.babeljs.io). Some of us are always online to chat!
|
||||
|
||||
## Developing
|
||||
|
||||
**Note:** Versions `< 5.1.10` can't be built.
|
||||
|
||||
Babel is built for node 4 and up but we develop using node 6. Make sure you are on npm 3.
|
||||
Babel is built for Node 4 and up but we develop using Node 6. Make sure you are on NPM 3.
|
||||
|
||||
You can check this with `node -v` and `npm -v`.
|
||||
|
||||
@ -120,12 +120,14 @@ Use the `TEST_GREP` variable to run a subset of tests by name:
|
||||
$ TEST_GREP=transformation make test
|
||||
```
|
||||
|
||||
To enable the node debugger added in v6.3.0, set the `TEST_DEBUG` environment variable:
|
||||
To enable the Node debugger added in v6.3.0, set the `TEST_DEBUG` environment variable:
|
||||
|
||||
```sh
|
||||
$ TEST_DEBUG=true make test
|
||||
```
|
||||
|
||||
You can combine `TEST_DEBUG` with `TEST_GREP` or `TEST_ONLY` to debug a subset of tests. If you plan to stay long in the debugger (which you'll likely do!), you may increase the test timeout by editing [test/mocha.opts](https://github.com/babel/babel/blob/master/test/mocha.opts).
|
||||
|
||||
To test the code coverage, use:
|
||||
|
||||
```sh
|
||||
|
||||
24
README.md
24
README.md
@ -22,9 +22,9 @@
|
||||
<a href="https://medium.com/friendship-dot-js/i-peeked-into-my-node-modules-directory-and-you-wont-believe-what-happened-next-b89f63d21558"><img alt="Business Strategy Status" src="https://img.shields.io/badge/business%20model-flavortown-green.svg"></a>
|
||||
</p>
|
||||
|
||||
Babel is a community-driven tool that helps you write the latest version of JavaScript.
|
||||
Babel is a community-driven tool that helps you write code in the latest version of JavaScript.
|
||||
|
||||
When your supported environments don't support certain features natively, it will help you compile it down to a supported version.
|
||||
When your supported environments don't support certain features natively, Babel will help you compile those features down to a supported version.
|
||||
|
||||
**In**
|
||||
|
||||
@ -71,7 +71,7 @@ Bugs and feature requests can be posted at https://github.com/babel/babel/issues
|
||||
|
||||
> We've moved our issues from phabricator back to github issues!
|
||||
|
||||
Former phabricator issue urls now automatically redirect to their corresponding Github issue:
|
||||
Former phabricator issue URLs now automatically redirect to their corresponding Github issue:
|
||||
|
||||
https://phabricator.babeljs.io/T2168 mostly corresponds to https://github.com/babel/babel/issues/2168.
|
||||
|
||||
@ -81,7 +81,7 @@ For documentation and website issues please visit the [babel/babel.github.io](ht
|
||||
|
||||
## Want to contribute to Babel?
|
||||
|
||||
Check out our [CONTRIBUTING.md](https://github.com/babel/babel/blob/master/CONTRIBUTING.md). If you have already joined slack, join our [#development](https://babeljs.slack.com/messages/development) channel!
|
||||
Check out our [CONTRIBUTING.md](https://github.com/babel/babel/blob/master/CONTRIBUTING.md). If you have already joined Slack, join our [#development](https://babeljs.slack.com/messages/development) channel!
|
||||
|
||||
You can also start by checking out the issues with the [help-wanted](https://github.com/babel/babel/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) label.
|
||||
|
||||
@ -89,7 +89,7 @@ Our discussions/notes/roadmap: [babel/notes](https://github.com/babel/notes)
|
||||
|
||||
## Packages
|
||||
|
||||
The Babel repo is managed as a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md); it's composed of many npm packages.
|
||||
The Babel repo is managed as a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md) that is composed of many NPM packages.
|
||||
|
||||
### Core Packages
|
||||
|
||||
@ -128,19 +128,19 @@ Check out the [`babel-handbook`](https://github.com/thejameskyle/babel-handbook/
|
||||
| [`babel-code-frame`](/packages/babel-code-frame) | [](https://www.npmjs.com/package/babel-code-frame) | [](https://david-dm.org/babel/babel?path=packages/babel-code-frame) |
|
||||
|
||||
- [`babel-cli`](/packages/babel-cli) is the CLI tool that runs `babel-core` and helps with outputting to a directory, a file, stdout and more (also includes `babel-node`). Check out the [docs](https://babeljs.io/docs/usage/cli/).
|
||||
- [`babel-types`](/packages/babel-types) is used to validate, build, change AST nodes.
|
||||
- [`babel-types`](/packages/babel-types) is used to validate, build and change AST nodes.
|
||||
- [`babel-polyfill`](/packages/babel-polyfill) is [literally a wrapper](https://github.com/babel/babel/blob/master/packages/babel-polyfill/src/index.js) around [`core-js`](https://github.com/zloirock/core-js) and [regenerator-runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime). Check out the [docs](https://babeljs.io/docs/usage/polyfill/).
|
||||
- [`babel-runtime`](/packages/babel-runtime) is similar to the polyfill except that it doesn't modify the global scope and is to be used with [`babel-plugin-transform-runtime`](/packages/babel-plugin-transform-runtime) (usually in library/plugin code). Check out the [docs](https://babeljs.io/docs/plugins/transform-runtime/).
|
||||
- [`babel-register`](/packages/babel-register) is a way to automatically compile files with babel on the fly by binding to node's require. Check out the [docs](http://babeljs.io/docs/usage/require/).
|
||||
- [`babel-template`](/packages/babel-template) is a helper function to make AST nodes. Instead you can pass a string representing the code you want to create rather than tediously building them using `babel-types`.
|
||||
- [`babel-helpers`](/packages/babel-helpers) is a set of premade `babel-template` functions that are used in some babel plugins.
|
||||
- [`babel-code-frame`](/packages/babel-code-frame) is a standalone package used to generate errors that prints the source code and points to error locations.
|
||||
- [`babel-register`](/packages/babel-register) is a way to automatically compile files with babel on the fly by binding to NodeJS's `require`. Check out the [docs](http://babeljs.io/docs/usage/require/).
|
||||
- [`babel-template`](/packages/babel-template) is a helper function to create AST nodes by passing a string representing the code instead of tediously building them using `babel-types`.
|
||||
- [`babel-helpers`](/packages/babel-helpers) is a set of pre-made `babel-template` functions that are used in some babel plugins.
|
||||
- [`babel-code-frame`](/packages/babel-code-frame) is a standalone package used to generate errors that print the source code and point to error locations.
|
||||
|
||||
### [Presets](http://babeljs.io/docs/plugins/#presets)
|
||||
|
||||
After Babel 6, the default transforms were removed; if you don't specify any plugins/presets it will just return the original source code.
|
||||
After Babel 6, the default transforms were removed; if you don't specify any plugins/presets, Babel will just return the original source code.
|
||||
|
||||
The transformer[s] used in Babel are the independent pieces of code that transform specific things. For example: the [`es2015-arrow-functions`](/packages/babel-plugin-transform-es2015-arrow-functions) transform specifically changes arrow functions into a regular function. Presets are just simply an array of plugins that make it easier to run a whole a set of transforms without specifying each one manually.
|
||||
The transformer[s] used in Babel are the independent pieces of code that transform specific things. For example: the [`es2015-arrow-functions`](/packages/babel-plugin-transform-es2015-arrow-functions) transform specifically changes arrow functions into regular functions. A preset is simply an array of plugins that make it easier to run a whole a set of transforms without specifying each one manually.
|
||||
|
||||
| Package | Version | Dependencies | Description |
|
||||
|--------|-------|------------|---|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user