!Work in progress![TOC]
The Sorting Hat
The Sorting Hat is a sapient artefact used at Hogwarts, which uses Legilimency (essentially, the ability to read minds) to determine which of the four school houses – Gryffindor, Hufflepuff, Ravenclaw or Slytherin – each new student is to be assigned. Source
API Documentation and tutorial
See: The Sorting Hat Docs
What is this repository for?
The Sorting Hat is a Node.js module which helps in managing user groups and user permissions with bitwise effiency.
In applying ArrayBuffers and bitwise operaions it tries to use minimal resources.
How do I get set up?
npm install the-sorting-hat
Details
Prerequisites to contribute
- Clone this repository, and check out the develop branch
- Ensure Node Version Manager is installed and operational
nvm installnpm install -g gulp
Linting
For this project ESLint is applied.
Execute: gulp lint
Currently the linter conforms to defaults from: eslint-plugin-node and some minor tweaks (see: .eslint.js).
Unit tests
Every path should be covered and can be checked after the unit test is executed, according to a coverage report.
Execute: gulp test
In the end, a brief version of the coverage report is shown. For the more extensive one, see: test/coverage/lcov-report/index.html.
API Documentation
A Gulp plugin: gulp-jsdoc3 is applied to generate the API documentation.
It's expected to write extensive comments in the code itself when contributing.
Every time code is updated, we need to ensure the documentation is in sync with the code.
Execute: gulp docs
The result is generated at: docs/index.html
Contribution guidelines
- When adding new features / code, creating corresponding unit tests are mandatory
- Code review will be done by means of pull requests to the
developbranch, preferably with the following pull request template:
h1. I ensured:
* [ ] I've updated the unit tests and covered enough parts of the code (`gulp lint` and `gulp test`)
* [ ] I've updated the API documentation within the code and generated a fresh export (`gulp docs`)Meta data
- Maintainer: Ivo Cazemier
- Git Repository
- API documentation and tutorial
(License: MIT, See the LICENSE file)