From 99238fd42b0fe20042c2aa124ebabda2f9a00789 Mon Sep 17 00:00:00 2001 From: Ynda Jas Date: Mon, 17 Jan 2022 20:31:32 +0000 Subject: [PATCH] feat: support for rankdir in CLI --- bin/cli.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/cli.js b/bin/cli.js index d8f14cd7..99f4db52 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -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 ', 'set the direction of the graph layout') .option('--extensions ', 'comma separated string of valid file extensions') .option('--require-config ', 'path to RequireJS config') .option('--webpack-config ', 'path to webpack config') @@ -130,6 +131,10 @@ if (!program.color) { config.edgeColor = '#757575'; } +if (program.rankdir) { + config.rankdir = program.rankdir; +} + function dependencyFilter() { let prevFile;