Skip to content

Commit

Permalink
Update contributing docs to use yarn (jestjs#2897)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttmarek authored and skovhus committed Apr 29, 2017
1 parent 77fb316 commit 970a4dd
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,37 @@ The core team will be monitoring for pull requests. When we get one, we'll run s
git checkout -b my_branch
```

2. Run `npm install`. We recommend that you use `npm` version 3 or later.
2. Jest uses [Yarn](https://code.facebook.com/posts/1840075619545360)
for running development scripts. If you haven't already done so,
please [install yarn](https://yarnpkg.com/en/docs/install).
3. Run `yarn install`.
```sh
npm install
yarn install
```
3. If you've added code that should be tested, add tests. You
4. If you've added code that should be tested, add tests. You
can use watch mode that continuously transforms changed files
to make your life easier.

```sh
# in the background
npm run watch
yarn run watch
```

4. If you've changed APIs, update the documentation.
5. Ensure the test suite passes via `npm test`. To run the test suite you
5. If you've changed APIs, update the documentation.
6. Ensure the test suite passes via `yarn test`. To run the test suite you
may need to install Mercurial (`hg`). On macOS, this can be done
using [homebrew](http://brew.sh/): `brew install hg`.
```sh
brew install hg # maybe
npm test
yarn test
```
6. If you haven't already, complete the CLA.
7. If you haven't already, complete the CLA.

### Contributor License Agreement (CLA)

Expand All @@ -66,7 +72,7 @@ To link `jest` on the command line to `jest-cli/bin/jest.js` in a development bu

```sh
cd /path/to/your/Jest_clone/packages/jest-cli
npm link
yarn link
```

To build Jest:
Expand All @@ -77,10 +83,10 @@ cd /path/to/your/Jest_clone
# Do one of the following:
# Check out a commit from another contributor, and then
npm run build
yarn run build
# Save your changes to Jest, and then
npm test # which also builds Jest
# Or, save your changes to Jest, and then
yarn test # which also builds Jest
```

To run tests in another project with the development build of Jest:
Expand All @@ -95,7 +101,7 @@ jest [options] # run jest-cli/bin/jest.js in the development build
To unlink `jest` on the command line from `jest-cli/bin/jest.js` in a development build:

```sh
npm unlink --global jest-cli
yarn unlink jest-cli
```

## Bugs
Expand Down

0 comments on commit 970a4dd

Please sign in to comment.