fixes [skip ci]
Ref https://github.com/babel/babel/issues/4590#issuecomment-254359917
This commit is contained in:
parent
6bc10b5573
commit
4b3aaae9c0
@ -14,15 +14,17 @@
|
|||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
Contributions are always welcome, no matter how large or small. Before
|
> Before contributing, please read our [code of conduct](https://github.com/babel/babel/blob/master/CODE_OF_CONDUCT.md).
|
||||||
contributing, please read our [code of conduct](https://github.com/babel/babel/blob/master/CODE_OF_CONDUCT.md).
|
|
||||||
|
Contributions are always welcome, no matter how large or small.
|
||||||
|
|
||||||
## Not sure where to start?
|
## Not sure where to start?
|
||||||
|
|
||||||
- If you aren't just making a documentation change, you'll probably want to learn a bit about a few topics.
|
- 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): Our current [spec](https://github.com/babel/babel/tree/master/doc/ast) is a bit different from [ESTree](https://github.com/estree/estree).
|
- [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`](/doc) directory for notes on Babel's internals
|
- This repository's [`/doc`](/doc) directory for 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 [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
|
- Check out [AST Explorer](http://astexplorer.net/#/scUfOmVOG5) to learn more about ASTs or make your own plugin in the browser
|
||||||
@ -30,11 +32,15 @@ contributing, please read our [code of conduct](https://github.com/babel/babel/b
|
|||||||
|
|
||||||
## Chat
|
## Chat
|
||||||
|
|
||||||
If you're stuck (or just want to chat), feel free to check out the `#discussion`/`#development` channels on our [slack](https://slack.babeljs.io).
|
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
|
## Developing
|
||||||
|
|
||||||
**Note:** Versions `< 5.1.10` can't be built. Make sure you are on npm 3.
|
**Note:** Versions `< 5.1.10` can't be built.
|
||||||
|
|
||||||
|
Babel is built for node 0.10 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`.
|
||||||
|
|
||||||
#### Setup
|
#### Setup
|
||||||
|
|
||||||
@ -66,15 +72,38 @@ If you wish to build a copy of Babel for distribution, then run:
|
|||||||
$ make build-dist
|
$ make build-dist
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Running tests
|
#### Running linting/tests
|
||||||
|
|
||||||
You can run tests for all packages via:
|
You can run lint via:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
# ~6 sec on a MacBook Pro (Mid 2015)
|
||||||
|
$ make lint
|
||||||
|
```
|
||||||
|
|
||||||
|
You can run eslint's autofix via:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ make fix
|
||||||
|
```
|
||||||
|
|
||||||
|
You can run tests + lint for all packages (slow) via:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# ~46 sec on a MacBook Pro (Mid 2015)
|
||||||
$ make test
|
$ make test
|
||||||
```
|
```
|
||||||
|
|
||||||
To run tests for a specific package, you can use the `TEST_ONLY` environment variable:
|
If you just want to run all tests:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# ~40 sec on a MacBook Pro (Mid 2015)
|
||||||
|
$ make test-only
|
||||||
|
```
|
||||||
|
|
||||||
|
Most likely you'll want to focus in on a specific issue.
|
||||||
|
|
||||||
|
To run tests for a specific package in [packages](/packages), you can use the `TEST_ONLY` environment variable:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ TEST_ONLY=babel-cli make test
|
$ TEST_ONLY=babel-cli make test
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user