Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CONTRIBUTING.md 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. # Contributing to Sinon.JS
  2. There are several ways of contributing to Sinon.JS
  3. - Look into [issues tagged `help-wanted`](https://github.com/sinonjs/sinon/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+wanted%22)
  4. - Help [improve the documentation](https://github.com/sinonjs/sinon/tree/master/docs) published
  5. at [the Sinon.JS website](https://sinonjs.org). [Documentation issues](https://github.com/sinonjs/sinon/issues?q=is%3Aopen+is%3Aissue+label%3ADocumentation).
  6. - Help someone understand and use Sinon.JS on [Stack Overflow](https://stackoverflow.com/questions/tagged/sinon)
  7. - Report an issue, please read instructions below
  8. - Help with triaging the [issues](https://github.com/sinonjs/sinon/issues). The clearer they are, the more likely they are to be fixed soon.
  9. - Contribute to the code base.
  10. ## Contributor Code of Conduct
  11. Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
  12. ## Reporting an issue
  13. To save everyone time and make it much more likely for your issue to be understood, worked on and resolved quickly, it would help if you're mindful of [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) when pressing the "Submit new issue" button.
  14. As a minimum, please report the following:
  15. - Which environment are you using? Browser? Node? Which version(s)?
  16. - Which version of SinonJS?
  17. - How are you loading SinonJS?
  18. - What other libraries are you using?
  19. - What you expected to happen
  20. - What actually happens
  21. - Describe **with code** how to reproduce the faulty behaviour
  22. See [our issue template](https://github.com/sinonjs/sinon/blob/master/.github/) for all details.
  23. ## Contributing to the code base
  24. Pick [an issue](https://github.com/sinonjs/sinon/issues) to fix, or pitch
  25. new features. To avoid wasting your time, please ask for feedback on feature
  26. suggestions with [an issue](https://github.com/sinonjs/sinon/issues/new).
  27. Make sure you have read [GitHub's guide on forking](https://guides.github.com/activities/forking/). It explains the general contribution process and key concepts.
  28. ### Making a pull request
  29. Please try to [write great commit messages](http://chris.beams.io/posts/git-commit/).
  30. There are numerous benefits to great commit messages
  31. - They allow Sinon.JS users to understand the consequences of updating to a newer version
  32. - They help contributors understand what is going on with the codebase, allowing features and fixes to be developed faster
  33. - They save maintainers time when compiling the changelog for a new release
  34. If you're already a few commits in by the time you read this, you can still [change your commit messages](https://help.github.com/articles/changing-a-commit-message/).
  35. Also, before making your pull request, consider if your commits make sense on their own (and potentially should be multiple pull requests) or if they can be squashed down to one commit (with a great message). There are no hard and fast rules about this, but being mindful of your readers greatly help you author good commits.
  36. ### Use EditorConfig
  37. To save everyone some time, please use [EditorConfig](http://editorconfig.org), so your editor helps make
  38. sure we all use the same encoding, indentation, line endings, etc.
  39. ### Installation
  40. The Sinon.JS developer environment requires Node/NPM. Please make sure you have
  41. Node installed, and install Sinon's dependencies:
  42. $ npm install
  43. This will also install a pre-commit hook, that runs style validation on staged files.
  44. ### Compatibility
  45. For details on compatibility and browser support, please see [`COMPATIBILITY.md`](COMPATIBILITY.md)
  46. ### Linting and style
  47. Sinon.JS uses [ESLint](http://eslint.org) to keep the codebase free of lint, and uses [Prettier](https://prettier.io) to keep consistent style.
  48. If you are contributing to a Sinon project, you'll probably want to configure your editors ([ESLint](https://eslint.org/docs/user-guide/integrations#editors), [Prettier](https://prettier.io/docs/en/editors.html)) to make editing code a more enjoyable experience.
  49. Both Prettier and ESLint will check the code in pre-commit hooks (when installed) and will be run before unit tests in the CI environment. The build will fail if the source code does not pass the checks.
  50. You can run the linter locally:
  51. ```
  52. $ npm run lint
  53. ```
  54. You can fix a lot of lint violations automatically:
  55. ```
  56. $ npm run lint -- --fix
  57. ```
  58. You can run prettier locally:
  59. ```
  60. $ npm run prettier:check
  61. ```
  62. You can fix style violations automatically:
  63. ```
  64. $ npm run prettier:write
  65. ```
  66. To ensure consistent reporting of lint warnings, you should use the same versions of ESLint and Prettier as defined in `package.json` (which is what the CI servers use).
  67. ### Run the tests
  68. Following command runs unit tests in PhantomJS, Node and WebWorker
  69. $ npm test
  70. ##### Testing in development
  71. Sinon.JS uses [Mocha](https://mochajs.org/), please read those docs if you're unfamiliar with it.
  72. If you're doing more than a one line edit, you'll want to have finer control and less restarting of the Mocha
  73. To start tests in dev mode run
  74. $ npm run test-dev
  75. Dev mode features:
  76. - [watching related files](https://mochajs.org/#w---watch) to restart tests once changes are made
  77. - using [Min reporter](https://mochajs.org/#min), which cleans the console each time tests run, so test results are always on top
  78. Note that in dev mode tests run only in Node. Before creating your PR please ensure tests are passing in Phantom and WebWorker as well. To check this please use [Run the tests](#run-the-tests) instructions.
  79. ### Compiling a built version
  80. Build requires Node. Under the hood [Browserify](http://browserify.org/) is used.
  81. To build run
  82. $ node build.js