-
Notifications
You must be signed in to change notification settings - Fork 3
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
(feature) --json option as output #4
base: master
Are you sure you want to change the base?
Conversation
--json flag will generate `filename.json` | ||
|
||
``` | ||
npx webpack-stats-duplicates --json <filename.json> .\stats.json |
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.
Is the backslash instead of forwards slash windows? Maybe just remove it to avoid confusion?
- .\stats.json
+ stats.json
|
||
var jsonArgHasBeenPassed = argv.json === ''; | ||
if(jsonArgHasBeenPassed) { | ||
printDuplicatesToJson(duplicates, 'blanky.json'); |
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.
blanky.json
should not be hard-coded
|
||
module.exports = function (duplicates, filename) { | ||
if(duplicates) { | ||
duplicates = duplicates.map( dup => { |
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.
Do we need to map the object at all? Can we just write the duplicates
object directly? I forget what other properteis are in that object.
Hi Brian,
Amazing package you created, I would like to add --json option as output, to connect the output to a Github Action.
Can these changes make it into your npm package?
Thank you