JSArch is basically a service that exposes a function allowing to extract and output architecture notes from the code.
This service needs some other services. To be able to mock and interchange them, we use Knifecycle for its dependency injection and inversion of control feature.
We use AST parsing and visiting to retrieve well formed architecture notes. It should be structured like that:
/** Architecture Note #{order}: {title}
{body}
To order architecture notes in a meaningful way we use title hierarchy like we used too at school with argumentative texts ;).
A sample tree structure could be:
- 1
- 1.1
- 1.2
- 2
- 3
By default, titles will be added like if the architecture notes were in a single separated file.
If you wish to add the architecture notes in a README.md file
you will have to set the titleLevel
option to as much #
as necessar to fit the title hierarchy of you README file.
By default, links to the architecture notes right in the code are supposed relative to the README.md file like you would find it in the GitHub homepage of you projects.
To override it, use the base
option.
The JSArch CLI tool basically wraps the jsArch service to make it usable from the CLI.
To see its options, run:
jsarch -h