Getting up and running is fairly straight forward, there are some (somewhat time consuming) initial steps to be taken
git clone https://github.com/konfirm/kontext ./kontext
(If you want to contribute, fork the kontext repository to your account and clone your fork)
npm install
This will take a while, as several packages (among which two headless browsers) will be installed.
devour
or, alternatively
./node_modules/.bin/devour
Yes, the devour build tool is used. This is a wrapper around the popular Gulp build tool, so it should feel familiar if you already use Gulp.
For unit testing Karma takes care of running the Jasmine tests and Istanbul code coverage analyzer.
karma start
or, alternatively
./node_modules/.bin/karma start
This will use the PhantomJS browser to run all the tests every time a file changes.
Distributions are the files you find in the dist folder, there are two files there:
- kontext-
<version>.js - kontext and all extensions, full source - kontext-
<version>.min.js - kontext and all extensions, minified
There should be no need to build these files other than running your own distribution, we always have the current builds in the dist folder.
The command to build a distribution is:
make distribution
It will take the version in the package.json file for the file name, create a fresh build so all sources are 'compiled' and contributors are added.
Help is always appreciated, just make sure to please ESLint as much as possible (so avoid disabling it). There is an .eslintrc file, so your favorite editor (e.g. Atom) can help you out with writing code.
As we trust our editor blindly and already have a rather exhaustive output from the devour (gulp) process, there is no additional linting done from there.
We do expect changes in code to be reflected in unit tests. While currently not at 100% (99.7% for statements in PhantomJS, mostly due to browser specific flows), we don't want to see the coverage numbers decline when the pull request is merged. For inspiration, you can always look at the existing tests for kontext and extensions.
Besides creating pull requests, requests for new features are also welcome. So if you know of a feature that must be added, create an issue describing your feature.