-
Notifications
You must be signed in to change notification settings - Fork 48
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
Support passing in dependencies directly via -f json -d file.json #21
Conversation
console.log(Commander.helpInformation()); | ||
process.exit(1); | ||
|
||
if (Commander.format !== "json" && !Commander.args.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there this special check for Commander.format !== "json"
?
Looks good. I'm a but unsure about the above if-condition, once resolved. I'll merge, and make a new release. |
Because in json format you pass the file containing the deps data, you don't need spider files, making the CLI arg required only for the previous use cases. |
We agree that to pass the file you need to pass the file via The above condition is to display a nice help message if no arguments are passed like |
Not correct. Commander.args doesn't include switches/options/whatever they're called :) But see the latest diff - I think it will satisfy us both, and be simpler.
|
instead of via --deps
Totally makes sense to use pass the file as the "input" in first argument. 👍 |
Support passing in dependencies directly via -f json file.json
Cool- were on a roll ! |
With example.json containing:
{"a":["sub/b"],"d":[],"fancy-main/not-index":[],"sub/b":["sub/c"],"sub/c":["d"]}
New feature:
./bin/dependo -f json -d example.json > example/index.html ; open example/index.html
Regression tested with:
./bin/dependo -f cjs lib/ > example/index.html ; open example/index.html