2015-07-27 07:28:52 +00:00
|
|
|
# Contributing to re-frame
|
|
|
|
|
2017-05-18 23:06:54 +00:00
|
|
|
Thank you for taking the time to contribute! Please note that re-frame follows a [code of conduct](docs/Code-Of-Conduct.md).
|
2015-07-27 07:28:52 +00:00
|
|
|
|
2015-09-21 02:47:53 +00:00
|
|
|
## Support questions
|
|
|
|
|
2016-07-14 06:41:54 +00:00
|
|
|
The Github issues are for bug reports and feature requests only. Support requests and usage
|
|
|
|
questions should go to the re-frame [Clojure Slack channel](http://clojurians.net) or
|
|
|
|
the [ClojureScript mailing list](https://groups.google.com/forum/#!forum/clojurescript).
|
2015-07-27 07:28:52 +00:00
|
|
|
|
2016-07-14 06:41:54 +00:00
|
|
|
## Pull requests
|
2015-07-27 07:28:52 +00:00
|
|
|
|
2017-09-12 04:37:28 +00:00
|
|
|
**Create pull requests to the master branch.**
|
2015-07-27 07:28:52 +00:00
|
|
|
|
2016-07-14 06:41:54 +00:00
|
|
|
## Running tests
|
2015-07-27 07:28:52 +00:00
|
|
|
|
2016-07-14 06:41:54 +00:00
|
|
|
#### Via Browser/HTML
|
2015-07-27 07:28:52 +00:00
|
|
|
|
2016-07-14 06:41:54 +00:00
|
|
|
To build the tests and run them in one step, just:
|
|
|
|
```sh
|
|
|
|
lein test-once # compiles & then opens test.html in the browser
|
|
|
|
```
|
2015-12-10 04:26:06 +00:00
|
|
|
|
2016-07-14 06:41:54 +00:00
|
|
|
You can also get auto compiles via:
|
2016-07-14 01:21:12 +00:00
|
|
|
```sh
|
2016-07-14 06:41:54 +00:00
|
|
|
lein test-auto
|
2016-07-14 01:21:12 +00:00
|
|
|
```
|
2016-07-14 06:41:54 +00:00
|
|
|
but you'll need to manually open `test/test.html` in a browser. And you'll also need to
|
2017-09-12 04:37:28 +00:00
|
|
|
manually reload this page after each auto compile.
|
2016-07-14 01:21:12 +00:00
|
|
|
|
|
|
|
#### Via Karma
|
|
|
|
|
2016-07-14 06:41:54 +00:00
|
|
|
To run the tests, you must have recent versions of node, npm, Leiningen, and a C++ compiler
|
|
|
|
toolchain installed. If you're on Linux or Mac OS X then you will be fine,
|
|
|
|
if you're on Windows then you need to install Visual Studio Community Edition,
|
|
|
|
and the C++ compiler dependencies.
|
2015-12-10 04:26:06 +00:00
|
|
|
|
2016-07-14 01:21:12 +00:00
|
|
|
```sh
|
2016-12-19 19:24:13 +00:00
|
|
|
npm install karma-cli -g # Install the Karma CLI runner
|
2016-07-14 01:21:12 +00:00
|
|
|
lein deps # runs lein-npm, installs Karma & other node dependencies. Only needed the first time.
|
|
|
|
lein karma-once # to build re-frame tests
|
|
|
|
karma start # to run the tests with an auto watcher
|
2015-12-10 04:26:06 +00:00
|
|
|
```
|
|
|
|
|
2015-07-27 07:28:52 +00:00
|
|
|
## Pull requests for bugs
|
|
|
|
|
|
|
|
If possible provide:
|
|
|
|
|
|
|
|
* Code that fixes the bug
|
|
|
|
* Failing tests which pass with the new changes
|
|
|
|
* Improvements to documentation to make it less likely that others will run into issues (if relevant).
|
|
|
|
* Add the change to the Unreleased section of [CHANGES.md](CHANGES.md)
|
|
|
|
|
|
|
|
## Pull requests for features
|
|
|
|
|
|
|
|
If possible provide:
|
|
|
|
|
|
|
|
* Code that implements the new feature
|
|
|
|
* Tests to cover the new feature including all of the code paths
|
|
|
|
* Docstrings for functions
|
|
|
|
* Documentation examples
|
|
|
|
* Add the change to the Unreleased section of [CHANGES.md](CHANGES.md)
|
2016-11-06 20:12:24 +00:00
|
|
|
|
|
|
|
## Pull requests for docs
|
|
|
|
|
|
|
|
* Make your documentation changes
|
|
|
|
* (Optional) Install doctoc with `npm install -g doctoc`
|
|
|
|
* (Optional) Regenerate the docs TOC with `bin/doctoc.sh` or `bin/doctoc.bat` depending on your OS
|