1.1.2 • Published 2 years ago

@amazon/glad v1.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

GLAD - Generate Layer Architecture Diagram

Automatically generate layer diagram view of your Javascript/Typescript source code dependencies.

Motivation

View and Keep your project source files layer dependencies clean. Avoid circular reference or referencing an upper layer from a lower layer.

Supports source files of type JS & TS, simply launch the glad and open the resulting glad.svg file.

Example

example

Technologies used

Features

  • Optional grouping of layers by folders.
  • Rendering views as Posters, Layers, or Grid.
  • Render with or without edges (arrow lines).

Installation

Globally

npm install -g .

DevDependencies

npm install -D @amazon/glad

As part of your build script step

By adding "glad" to your build step, you will be alerted if you introduce a circular dependencies.

{
  "scripts": {
    "build": "glad ."
  }
}

Execute

glad

CLI Help

glad -h

Usage: glad < path > [options]  "Generates an SVG layer diagram file based on your TS & JS source files dependencies"

Options:
  -h, --help              Show help  [boolean]
  -i, --input             File path to scan  [string]
  -o, --output            File path to output svg  [string] [default: "./glad.svg"]
  -e, --exclude           File glob to exclude from the analysis, eg: "**/*.test.js"  [string]
      --view              Type of diagram to generate  [string] [choices: "poster", "layers", "grid"] [default: "poster"]
      --align             Set the horizontal position of the nodes  [string] [choices: "left", "center", "right"] [default: "center"]
      --edges             Type of rendering for all edges  [string] [choices: "files", "folders"] [default: "files"]
      --lines             Type of rendering for all edges  [string] [choices: "curve", "strait", "elbow", "angle", "hide", "warnings"] [default: "curve"]
      --lineEffect, --le  Special effect on the lines  [string] [default: "flat"]
  -l, --layers            Display the layers background and numbers  [boolean] [default: false]
  -d, --details           Show additional values for each folders  [boolean] [default: false]
      --json              Output the graph to file called glad.json  [boolean] [default: false]
      --debug             For tech support  [boolean] [default: false]
      --listFiles         List all input files found  [boolean] [default: false]
  -s, --silent            No output except for errors  [boolean] [default: false]
  -v, --version           Show version number  [boolean]

Examples:
  glad . --view layers -l --edges -hide  ">>> Produce a diagram with no edges, each layers are numbered."

License

This project is licensed under the Apache-2.0 License.

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

0.1.0

2 years ago