Skip to content

Latest commit

 

History

History
102 lines (62 loc) · 2.09 KB

ARCHITECTURE.md

File metadata and controls

102 lines (62 loc) · 2.09 KB

Architecture Notes

Summary

  1. jsArch service
    1. Extraction
    2. Ordering
    3. Title level
    4. Base
  2. CLI

1. jsArch service

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.

Dependencies Graph

See in context

1.1. Extraction

We use AST parsing and visiting to retrieve well formed architecture notes. It should be structured like that:

/** Architecture Note #{order}: {title}

{body}

See in context

1.2. Ordering

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

See in context

1.3. Title level

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.

See in context

1.4. Base

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.

See in context

2. CLI

The JSArch CLI tool basically wraps the jsArch service to make it usable from the CLI.

To see its options, run:

jsarch -h

See in context