Numerous Pulsating Martians
    Have ideas to improve npm?Join in the discussion! »

    jsarch

    4.0.1 • Public • Published

    jsarch

    A simple module to extract architecture notes from your code.

    GitHub license Build status Coverage Status NPM version Dependency Status devDependency Status Package Quality Code Climate

    Usage

    You may want to generate this project's architecture notes:

    npm i -g jsarch
    
    git clone git@github.com:nfroidure/jsarch.git
    
    cd jsarch
    
    jsarch **/*.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 require it by your side.

    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

    Param Type Default Description
    services Object Services (provided by the dependency injector)
    services.CONFIG Object The JSArch config
    services.EOL Object The OS EOL chars
    services.glob Object Globbing service
    services.fs Object File system service
    services.parser Object Parser service
    [services.log] Object noop Logging 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

    Param Type Description
    options Object Options (destructured)
    options.cwd Object Current working directory
    options.patterns Object Patterns to look files for (see node-glob)
    options.eol Object End of line character (default to the OS one)
    options.titleLevel Object The base title level of the output makdown document
    options.base Object The base directory for the ARCHITECTURE.md references

    Authors

    License

    MIT

    Install

    npm i jsarch

    DownloadsWeekly Downloads

    28

    Version

    4.0.1

    License

    MIT

    Unpacked Size

    177 kB

    Total Files

    35

    Last publish

    Collaborators

    • avatar
    • avatar