Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for rankdir in CLI #311

Merged
merged 1 commit into from
Jan 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ program
.option('--orphans', 'show modules that no one is depending on')
.option('--leaves', 'show modules that have no dependencies')
.option('--dot', 'show graph using the DOT language')
.option('--rankdir <direction>', 'set the direction of the graph layout')
.option('--extensions <list>', 'comma separated string of valid file extensions')
.option('--require-config <file>', 'path to RequireJS config')
.option('--webpack-config <file>', 'path to webpack config')
Expand Down Expand Up @@ -130,6 +131,10 @@ if (!program.color) {
config.edgeColor = '#757575';
}

if (program.rankdir) {
config.rankdir = program.rankdir;
}

function dependencyFilter() {
let prevFile;

Expand Down