Skip to content

Commit

Permalink
Merge pull request #36 from amiram/extentions-support
Browse files Browse the repository at this point in the history
Extentions support
  • Loading branch information
amiram authored Jan 25, 2018
2 parents dcc80ca + 8ffd7fc commit bdbdb26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/dependo
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Commander
.option('-x, --exclude <regex>', 'a regular expression for excluding modules')
.option('-t, --title <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) {
Expand All @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit bdbdb26

Please sign in to comment.