diff --git a/bin/dependo b/bin/dependo index 4682606..5bc4de0 100755 --- a/bin/dependo +++ b/bin/dependo @@ -16,6 +16,7 @@ Commander .option('-x, --exclude ', 'a regular expression for excluding modules') .option('-t, --title ', 'the title of the generated document (dependo)') .option('-v, --reverse', 'reverse direction of arrows', false) + .option('-e, --extensions <extensions>', 'Valid file extensions used to find files in directories e.g. .js,.ts Default: .js', '.js') .parse(process.argv); if (!Commander.args.length) { @@ -35,7 +36,8 @@ var dependo = new Dependo(src, { exclude: Commander.exclude, directDeps: directDeps, title: Commander.title, - transform: Commander.reverse ? converse : undefined + transform: Commander.reverse ? converse : undefined, + extensions: Commander.extensions.split(',') }); var html = dependo.generateHtml(); diff --git a/readme.md b/readme.md index 12beb40..f3dd7d8 100644 --- a/readme.md +++ b/readme.md @@ -53,6 +53,7 @@ Options 'requireConfig': Path to RequireJS config used to find shim dependencies and path aliases. Not used by default. 'reverse': Reverse dependency arrow directions. 'title': The title of the generated HTML document. + 'extensions': Valid file extensions used to find files in directories e.g. .js,.ts Default: .js } ``` @@ -92,6 +93,7 @@ CLI -x, --exclude <regex> a regular expression for excluding modules -t, --title <title> the title of the generated document (dependo) -v, --reverse reverse direction of arrows + -e, --extensions file extensions to use separated by comma ### Generate HTML report of all module dependencies (AMD), and save it to /example/report.html