Parsing conventional commits using nearley grammar.
Currently there are some scripts setup for development.
The build script compiles both the Nearley grammar and "wrapping" scripts.
It's separated into build-babel
and build-nearley
, both combined in build
.
The tests depend on built files, but isn't run automatically. Make sure you execute this before testing.
$ npm run build
$ npm run build-babel
$ npm run build-nearley
In this repository there are some tests for the "wrapping" scripts and tests for integration testing.
These two are separated to keep the "wrapping" scripts as fast as possible.
To run the normal tests simply run npm test
, and for integration npm run test-integration
.
These tests depend on built files, make sure you build it before testing.
$ npm run test
$ npm run test-integration
Nearley comes with some extra useful grammar debugging tools.
This script allows you to get a railroad visualisation of the grammar itself.
A html file with the visualisation is created at grammar-debug.html
.
$ npm run debug