• Stars
    star
    174
  • Rank 219,104 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

prints a dependency graph in dot/mermaid format for your typescript/react project

NPM Downloads Node.js CI

TS-Dependency-Graph

Prints a dependency graph in dot format for your typescript or react project. Supported files are .ts and .tsx. Supports tsconfig path mappings since v1.4.3.

Usage

Install CLI

npm i ts_dependency_graph -g

 ts_dependency_graph --help
Options:
  --help                          Show help                            [boolean]
  --version                       Show version number                  [boolean]
  --color_edges                   use a random color to color the edges, group
                                  by node.             [boolean] [default: true]
  --start                         the starting file, for the analysis. can also
                                  be a folder or a glob for multiple starting
                                  files.                     [string] [required]
  --graph_folder, --graphfolders  groups files in their folder in the graph
                                                      [boolean] [default: false]
  --aggregate_by_folder, --agg    create graph on folder level
                                                      [boolean] [default: false]
  --max_depth                                           [number] [default: 1000]
  --filter                        removes files containing the provided
                                  strings. Can be negated with - in front, to
                                  remove files not containing the filter. e.g.
                                  'NOT module1' - everything not containing
                                  module1.ts will be filtered.
                                                           [array] [default: []]
  --filter_edges                  Experimental. removes edges containing the
                                  provided strings, the format is
                                  start_file=>target_file. The edges containing
                                  start_file AND target_file are removed. Start
                                  and target can be negated with 'NOT ' in front
                                  . (Currently) This is not just a postprocess
                                  on the graph. The edges won't be followed.
                                  Note: put in quotes.     [array] [default: []]
  --verbose, -v                   prints information about ignored files
                                                      [boolean] [default: false]
  --verbose_filter                prints information about filtered files and
                                  edges               [boolean] [default: false]
  --hotspots, -h                  identify hotspots, by analyzing number of
                                  incoming and outgoing edges
                                                      [boolean] [default: false]
  --base_path                     calculates path relatives to the base path
    [string] [default: "/home/pascal/LinuxData/Development/ts-dependency-graph"]
  --show_path_to                  will display the shortest paths between start
                                  and show_path_to                      [string]

ts_dependency_graph --start src/index.ts

Use output with https://stamm-wilbrandt.de/GraphvizFiddle/#, https://dreampuf.github.io/GraphvizOnline/, http://www.webgraphviz.com/, or by piping result to dot tool

ts_dependency_graph --start src/index.ts --graph_folder | dot -T svg > dependencygraph.svg

graph_example

Real World Example

Usage on quickwit-ui

ts_dependency_graph --start src/index.tsx --graph_folder | dot -T svg > dependencygraph.svg

Self Graph

Use from Github Repo

npx ts-node src/index.ts --help

More Repositories

1

lz4_flex

Fastest pure Rust implementation of LZ4 compression/decompression.
Rust
435
star
2

yamaha-nodejs

A node module to control your yamaha receiver
JavaScript
121
star
3

serde_json_borrow

Fast JSON deserialization on borrowed data
Rust
70
star
4

wana_kana_rust

Utility library for checking and converting between Japanese characters - Hiragana, Katakana - and Romaji
Rust
55
star
5

toml-to-json-online-converter

toml to json and json to toml online converter - written in rust compiled to wasm
HTML
29
star
6

binggan

Benchmarking library for stable Rust
Rust
25
star
7

rust_measure_time

measures and prints wall time in rust for given scope
Rust
14
star
8

veloci

High performance fulltext search engine
Rust
10
star
9

cool-id-generator

Rust
7
star
10

lz4-wasm

https://pseitz.github.io/lz4-wasm/
JavaScript
7
star
11

bench_riddle

Repo To Blogpost https://quickwit.io/blog/performance-investigation
Rust
4
star
12

japanese-dictionary

JavaScript
3
star
13

HomeAutomation.js

JavaScript
3
star
14

future_cache

async cache that caches futures and their results in rust
Rust
3
star
15

germansynonyms

uses openthesaurus and nodejs to find german synonyms
JavaScript
3
star
16

chinese

HTML
2
star
17

chemtrailsimulator

JavaScript
2
star
18

rust_simplex_noise

Rust
2
star
19

GitAliases

Just some useful git aliases
Shell
2
star
20

tantivy_bench_graph

regression tracking for tantivy benchmarks
JavaScript
2
star
21

reddit-api-node

2
star
22

quickcalc

A spotlight like calculator based on iced
Rust
1
star
23

easystarts

typescript port of easystarjs
JavaScript
1
star
24

node-hdbconnect

hana database driver for node - wraps hdbconnect
Rust
1
star
25

stay_focused

C
1
star
26

vint32_rust

fast vint u32 encoding for rust
Rust
1
star
27

fastcpy

fastcpy
Rust
1
star
28

rust_string_hashmap

Rust
1
star
29

Sublime-Keymap

1
star
30

masterofcellion

JavaScript
1
star
31

watcher

watch files, copy git stage
JavaScript
1
star
32

DHCP-Broadcast-Callback

Lets you register a callback for received DHCP Callbacks with the MAC adress of the issuing device.
JavaScript
1
star
33

sort_and_fragmentation

small experiment to measure memory fragmentation on sort speed
Rust
1
star
34

Custom-Highlighter

Highlights text for any ruleset
JavaScript
1
star
35

rappable

JavaScript
1
star
36

diskbased_json_array

file based random access json array
JavaScript
1
star
37

fst_compression

Rust
1
star
38

SoundOnReturn

Plays sound on a yamaha receiver, when mobile phone connects with wlan
JavaScript
1
star
39

quantile_compare

quantile_compare
Rust
1
star
40

tocfl

chinese TOCFL vocabulary by levels
Rust
1
star
41

kanji_hanzi_converter

Translate Japanese Kanji to Chinese Hanzi
Rust
1
star
42

peakmem-alloc

Measure the peak memory consumption of a given scope in rust
Rust
1
star
43

test_serde_formats

test_serde_formats
Rust
1
star