2017-02-06 13:19:34 +00:00
# Contributing to Next.js
Our Commitment to Open Source can be found [here ](https://zeit.co/blog/oss )
1. [Fork ](https://help.github.com/articles/fork-a-repo/ ) this repository to your own GitHub account and then [clone ](https://help.github.com/articles/cloning-a-repository/ ) it to your local device.
2019-02-14 13:33:00 +00:00
1. Install yarn: `npm install -g yarn`
1. Install the dependencies: `yarn`
1. Run `yarn run dev` to build and watch for code changes
2018-10-06 05:32:50 +00:00
2018-10-25 20:51:20 +00:00
## To run tests
2018-10-06 05:32:50 +00:00
Running all tests:
```
yarn testonly
```
Running a specific test suite inside of the `test/integration` directory:
```
yarn testonly --testPathPattern "production"
```
Running just one test in the `production` test suite:
```
yarn testonly --testPathPattern "production" -t "should allow etag header support"
```
2018-10-25 20:51:20 +00:00
## Running the integration test apps without running tests
2018-10-06 05:32:50 +00:00
```
./node_modules/.bin/next ./test/integration/basic
```
2018-10-25 20:51:20 +00:00
## Testing in your own app
2018-10-06 05:32:50 +00:00
2018-10-25 20:51:20 +00:00
First `next-server` needs to be linked:
2018-10-06 05:32:50 +00:00
```
2018-10-25 20:51:20 +00:00
cd packages/next-server
npm link
2018-10-06 05:32:50 +00:00
```
2018-10-25 20:51:20 +00:00
Then `next` needs to link to `next-server` , and be linked itself:
2018-10-06 05:32:50 +00:00
```
2018-10-25 20:51:20 +00:00
cd packages/next
2018-10-06 05:32:50 +00:00
npm link
2018-10-25 20:51:20 +00:00
npm link next-server
2018-10-06 05:32:50 +00:00
```
2018-10-25 20:51:20 +00:00
And finally, link the `next` package inside your app:
2018-10-06 05:32:50 +00:00
```
npm link next
```
Then you can run your app with the local version of Next.js (You may need to re-run the example app as you change server side code in the Next.js repository).