Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.41 KB

contributing.md

File metadata and controls

54 lines (36 loc) · 1.41 KB

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

Because of the way Node.js resolves modules the easiest way to test your own application is copying it into the test directory.

cp -r yourapp <next.js directory>/test/integration/yourapp

Make sure you remove react react-dom and next from test/integration/yourapp/node_modules as otherwise they will be overwritten.

rm -rf <next.js directory>/test/integration/yourapp/{react,react-dom,next,next-server}

Then run your app using:

./node_modules/.bin/next ./test/integration/yourapp