Options
All
  • Public
  • Public/Protected
  • All
Menu

:open_file_folder: tslint-folders-diagrams

Generate architecture diagrams from the folder configuration of tslint-folders.

status - stable

tslint-folders-diagrams is stable and in use every day in CI builds and on dev boxes (Linux, Mac, Windows) for at least one major product.

Travis Coveralls install size

Greenkeeper badge Dependencies Dev Dependencies

npm Package NPM Downloads

styled with prettier semantic-release

License: MIT Donate


why?

Automatically create up-to-date architecture diagrams from the same config as used by tslint-folders to validate the source code.


features

  • Provides a tool to generate architecture diagrams from the same model used by tslint-folders
  • Output formats:
    • plain text - suitable for a markdown file
    • dot (graphviz)
    • svg (via graphviz)

versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.


usage

1 Install via yarn into your website

yarn add tslint-folders-diagrams

2 Generate a summary of the package configuration

Assuming that tslint.tslint-folders.json (from tslint-folders) has been correctly configured to model the expected package structure, then you can run this command to generate a summary:

node node_modules/tslint-folders-diagrams/dist/lib/tools/docsGenerator tslint.tslint-folders.json Text

example output:

package structure:
_____
shell - Application Shell
  --> (any)

todo-area - TODO Area Package
  --> grid-package, utils
    folders:
      components - components
        --> (any)

      viewmodels - view models
        --> models, utils

      models - models
        --> utils

      utils - utils
        --> (none)

contact-area - Area that shows contact details
  --> grid-package, utils

grid-package - Grid Package with no dependencies
  --> (none)

utils - Utils package
  --> (none)

_____

Allowed imports are shown for each package, after the --> arrow.

using graphviz to generate image diagrams of the architecture

A diagram can be automatically generated from the same config used to validated the code:

example diagram

see generating diagrams for details.


sites

site URL
source code (github) https://github.com/mrseanryan/tslint-folders-diagrams
github page https://mrseanryan.github.io/tslint-folders-diagrams/
npm https://www.npmjs.com/package/tslint-folders-diagrams

building and testing this source code

To work on the source code for tslint-folders-diagrams, there are a few scripts:

command description
yarn build Builds the tool to the 'dist' folder, where it can be executed.
yarn docs Generates a summary of the package structure described in tslint.json.
yarn lint Lints the source code of the rules.
yarn start Builds, tests and lints the code.

developing code in this repository

see the contributing readme.

origin

This project is based on the excellent seeder project typescript-library-starter.

The project was started to avoid having to repeatedly fix similar coding issues in large TypeScript code bases.

ORIGINAL readme (from the seeder project)

see here


that's it

That's pretty much it. Let me know if this is useful or how it can be improved!

authors

Original work by Sean Ryan - mr.sean.ryan(at gmail.com)

licence = MIT

This project is licensed under the MIT License - see the LICENSE file for details

Index

Type aliases

DocConfig

DocConfig: object

Type declaration

  • dot: DotDocConfig
  • format: DocFormat
  • importBlacklist: string
  • importWhitelist: string
  • outpath: string
  • pathToTslintJson: string
  • skipSubFolders: boolean

DotDocConfig

DotDocConfig: object

Type declaration

  • clusterFromTslintJson: boolean
  • colorScheme: string
  • isGraphOptimizerEnabled: boolean
  • maxColors: number
  • packageShape: string
  • showImportAnyAsNodeNotEdges: boolean
  • subFolderShape: string
  • subTitle: string
  • title: string

TypeWithId

TypeWithId: object

Type declaration

  • id: string

Variables

Const NEW_LINE

NEW_LINE: "" = ""

Const NUM_MANDATORY_ARGS

NUM_MANDATORY_ARGS: 4 = 4

Const SECTION_SEPARATOR

SECTION_SEPARATOR: "_____" = "_____"

Const SPACES_PER_TAB

SPACES_PER_TAB: 2 = 2

Functions

main

  • main(): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc