6.0.3 • Published 9 months ago

jsarch v6.0.3

Weekly downloads
40
License
MIT
Repository
github
Last release
9 months ago

jsarch

A simple module to extract architecture notes from your code.

GitHub license Coverage Status

Usage

To generate any project's architecture notes:

jsarch src/*.js > ARCHITECTURE.md

Configuration

You can set your own configuration by adding a jsarch property in your package.json file (see the defaults).

For example, if you which to have TypeScript support and you use Gitlab instead of GitHub, just add this:

{
    // (...)
    "jsarch": {
        "gitProvider": "bitbucket",
        "parserOptions": {
          "plugins": ["typescript"]
        }
    }
    // (...)
}

Per default, the Babel parser is used, but you can change it with the parser option. You'll have to install it before using it.

Develoment

To get involved into this module's development:

npm i -g jsarch

git clone git@github.com:nfroidure/jsarch.git

cd jsarch

npm it
npm run build

node bin/jsarch **/*.js > ARCHITECTURE.md

Architecture Notes

You can see this repository architecture notes for an example of the kind of content generated by this module.

API

initJSArch(services) ⇒ Promise.<function()>

Declare jsArch in the dependency injection system

Kind: global function

ParamTypeDefaultDescription
servicesObjectServices (provided by the dependency injector)
services.CONFIGObjectThe JSArch config
services.EOLObjectThe OS EOL chars
services.globObjectGlobbing service
services.fsObjectFile system service
services.parserObjectParser service
services.logObjectnoopLogging service

initJSArch~jsArch(options) ⇒ Promise.<String>

Compile an run a template

Kind: inner method of initJSArch
Returns: Promise.<String> - Computed architecture notes as a markdown file

ParamTypeDescription
optionsObjectOptions (destructured)
options.cwdObjectCurrent working directory
options.patternsObjectPatterns to look files for (see node-glob)
options.eolObjectEnd of line character (default to the OS one)
options.titleLevelObjectThe base title level of the output makdown document
options.baseObjectThe base directory for the ARCHITECTURE.md references

Authors

License

MIT

6.0.3

9 months ago

6.0.2

9 months ago

6.0.1

1 year ago

6.0.0

2 years ago

5.0.2

2 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.0.0

4 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.3.0

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago