mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
b243219461
Following my own experience getting set up to do Nuxt work recently, I've updated `CONTRIBUTING.md` in a way would have helped me greatly.
1.5 KiB
1.5 KiB
Contributing to Nuxt.js
- Fork this repository to your own GitHub account and then clone it to your local device.
- Run
npm install
to install the dependencies.
Note that both npm and yarn have been seen to miss installing dependencies. To remedy that, you can either delete the
node_modules
folder in your example app and install again or do a local install of the missing dependencies.
- Add an example app to
examples/
before writing any code. - Create a fixture app under
test/fixtures/
. See others for examples.
To run an example or fixture app with your copy of Nuxt, do:
bin/nuxt examples/your-app
bin/nuxt test/fixtures/your-fixture-app
npm link
could also (and does, to some extent) work for this, but it has been known to exhibit some issues. That is why we recommend callingbin/nuxt
directly to run examples.
Once you've modified Nuxt and seen your modifications reflected correctly in your example app and fixture, add unit
and, if necessary, e2e
tests that can ensure its functionality and future maintanability. Study other tests carefully for reference.
Running specific tests
npm install jest -g
jest test/unit/test.js
Running test suites
yarn test
Or, per group:
yarn test:fixtures
yarn test:unit
yarn test:e2e
Opening PRs
- Please make sure your PR passes the lint test (
npm run lint
). - Please wait for tests to run and verify potential failures.