diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 41ffe23ea..82a41d71f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,47 @@ -Welcome! Thanks for your interest in contributing to api.qunitjs.com. You're **almost** in the right place. More information on how to contribute to this and all other jQuery Foundation projects is over at [contribute.jquery.org](http://contribute.jquery.org). You'll definitely want to take a look at the articles on contributing [documentation](http://contribute.jquery.org/documentation). +# Contributing -You may also want to take a look at our [commit & pull request guide](http://contribute.jquery.org/commits-and-pull-requests/) and [style guides](http://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](http://contribute.jquery.org/cla). +Welcome! Thanks for your interest in contributing to QUnit. This document is +intended to help make your experience smooth and enjoyable. If you feel +anything should be added or clarified, definitely let us know. -You can find us on [IRC](http://irc.jquery.org), specifically in #jquery-content should you have any questions. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](http://contribute.jquery.org/open-source/). +If this is your first time contributing to Open Source Software in general, then +you might want to start by looking at [jQuery's excellent contributing guide](http://contribute.jquery.org/open-source/). + +## Contributor License Agreement + +As a first step, in order to contribute to QUnit, you'll need to sign the JS +Foundation's [CLA for QUnit](https://cla.js.foundation/qunitjs/qunit). + +## Development + +In order to contribute any changes to the QUnit repo, you'll need to first +[fork the repository](https://help.github.com/articles/fork-a-repo/). After that +you should [create a branch](https://bocoup.com/blog/git-workflow-walkthrough-feature-branches) +for the change and commit any relevant changes. + +Workflows for documentation or code changes are outlined below. + +### Code + +For code changes, you'll need to have [`node.js`](https://nodejs.org/en/) and +[`yarn`](https://yarnpkg.com/en/) installed on your machine. + +Install dependencies in the repository via `yarn install`. Make your code +changes and run `yarn test` to lint and test the changes. To run tests as you +make changes to the code base, you can use `yarn dev` which will rebuild QUnit +and run tests any time you make a change to the source code. + +Almost all code changes should be accompanied by new unit tests to verify the +changes being made. Assuming all existing and any new tests are passing, make a +commit, push it to GitHub and create a pull request. Be sure to include some +background for the change in the commit message and the message `Fixes #nnn`, +referring to the issue number you're addressing. + +### Documentation + +The API documentation for QUnit lives in the `docs` directory of this repository. +For the rest of the QUnit website, see the [qunitjs.com repo](https://github.com/qunitjs/qunitjs.com). + +The API documentation in this repo uses [`jekyll`](https://jekyllrb.com/). If +you make a change to the documentation, use `jekyll serve` to verify how the +change will look when deployed to the website. diff --git a/README.md b/README.md index a393e6ac3..4d78b1247 100644 --- a/README.md +++ b/README.md @@ -21,21 +21,14 @@ run the tests after each small refactoring step and always know what change broke something. QUnit is similar to other unit testing frameworks like JUnit, but makes use of -the features JavaScript provides and helps with testing code in the browser, e.g. -with its stop/start facilities for testing asynchronous code. +the features JavaScript provides and helps with testing code in the browser, such as built in support for asynchronicity and exception handling. -If you are interested in helping developing QUnit, you are in the right place. -For related discussions, visit the -[QUnit and Testing forum](https://forum.jquery.com/qunit-and-testing). -You can also chat with us on [Gitter](https://gitter.im/qunitjs/qunit) if you -need help using or developing QUnit. +## Support -## Development +If you need help using QUnit, visit the [QUnit and Testing forum](https://forum.jquery.com/qunit-and-testing) or chat with us on [Gitter](https://gitter.im/qunitjs/qunit). -To submit patches, fork the repository, create a branch for the change. Then implement -the change, run `npm test` to lint and test it, then commit, push and create a pull request. +If you believe there is a bug with QUnit or would like to request a new feature, [open an issue](https://github.com/qunitjs/qunit/issues). -Include some background for the change in the commit message and `Fixes #nnn`, referring -to the issue number you're addressing. +## Development / Contributions -To run `npm test`, you need [Node.js](https://nodejs.org/download/), which includes `npm`. +If you are interested in helping develop QUnit, check out our [contributing guide](./CONTRIBUTING.md). diff --git a/package.json b/package.json index 2b18dd68d..262d17572 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "scripts": { "browserstack": "grunt build && sh build/run-browserstack.sh", "build": "grunt build", + "dev": "grunt watch", "test": "grunt", "coverage": "grunt coverage", "test:cli": "grunt build && npm link && qunit test/cli/*.js"