Giter Club home page Giter Club logo

glad's Introduction

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

Standard - JavaScript Style Guide

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.

glad's People

Contributors

amazon-auto avatar jpdup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.