Skip to content
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

Add option report-json #322

Open
tyankatsu0105 opened this issue Jul 6, 2019 · 0 comments · May be fixed by #323
Open

Add option report-json #322

tyankatsu0105 opened this issue Jul 6, 2019 · 0 comments · May be fixed by #323

Comments

@tyankatsu0105
Copy link

tyankatsu0105 commented Jul 6, 2019

Do you want to request a feature or report a bug?
feature

What is the current behavior?
Report function does not exist.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
When run npm run bundlesize --output-json,
output bundlesize-report.json.

[
  {
    "message": "./dist/js/about.93459521.js: 282B < maxSize 10KB (gzip)",
    "fail": false,
    "size": 282,
    "maxSize": 10240
  },
  {
    "message": "./dist/js/app.0b7c728b.js: 2.21KB < maxSize 10KB (gzip)",
    "fail": false,
    "size": 2264,
    "maxSize": 10240
  },
  {
    "message": "./dist/js/chunk-vendors.f167eeb4.js: 40.63KB > maxSize 10KB (gzip)",
    "fail": true,
    "size": 41608,
    "maxSize": 10240
  },
  {
    "message": "./dist/css/app.c6167d4a.css: 271B (gzip)",
    "fail": false,
    "size": 271,
    "maxSize": null
  },
  {
    "message": "./dist/img/logo.82b9c7a5.png: 11.44KB (no compression)",
    "fail": false,
    "size": 11713,
    "maxSize": null
  }
]

This option is always exit code 0.
So --report-json option is not always an error.

If this is a feature request, what is motivation or use case for changing the behavior?
We can edit data made from bundlesize

Please mention other relevant information.

  • node version 11.8.0
  • npm version 6.5.0
  • Operating system nodenv
  • bundlesize version 0.18.0
  • CI you are using TravisCI
@tyankatsu0105 tyankatsu0105 linked a pull request Jul 7, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant