1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/contributing.md
Anderson Leite d8f879402b Update contributing.md to use yarn. (#5662)
The current contributing.md instructions are outdated since the project uses yarn.

The problem:
Without installing yarn we have the following error/output:

`lerna ERR! yarn run prepublish exited ENOENT in 'next-server'`

Adding new instructions on how to install and run the project.
2018-11-11 20:52:42 +01:00

1.4 KiB

Contributing to Next.js

Our Commitment to Open Source can be found here

  1. Fork this repository to your own GitHub account and then clone it to your local device.
  2. Install yarn: npm install -g yarn
  3. Install the dependencies: yarn
  4. Run yarn run bootstrap, which will link all repositories locally
  5. Run yarn run dev to build and watch for code changes

To run tests

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"

Running the integration test apps without running tests

./node_modules/.bin/next ./test/integration/basic

Testing in your own app

First next-server needs to be linked:

cd packages/next-server
npm link

Then next needs to link to next-server, and be linked itself:

cd packages/next
npm link
npm link next-server

And finally, link the next package inside your app:

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).