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 on doc custom paths to stats and report files #210

Merged

Conversation

leonascimento
Copy link
Contributor

This pull request should add that we can be able to
define the absolute paths to generate the statsFileName or
reportFileName.

Relates to #186 #185

@jsf-clabot
Copy link

jsf-clabot commented Sep 13, 2018

CLA assistant check
All committers have signed the CLA.

@valscion
Copy link
Member

Thanks! Could you sign the CLA?

@leonascimento
Copy link
Contributor Author

@valscion I forgot sorry.
Now I signed.
Thanks.

Copy link
Member

@valscion valscion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

README.md Outdated
@@ -56,11 +56,11 @@ new BundleAnalyzerPlugin(options?: object)
|**`analyzerMode`**|One of: `server`, `static`, `disabled`|Default: `server`. In `server` mode analyzer will start HTTP server to show bundle report. In `static` mode single HTML file with bundle report will be generated. In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`. |
|**`analyzerHost`**|`{String}`|Default: `127.0.0.1`. Host that will be used in `server` mode to start HTTP server.|
|**`analyzerPort`**|`{Number}`|Default: `8888`. Port that will be used in `server` mode to start HTTP server.|
|**`reportFilename`**|`{String}`|Default: `report.html`. Path to bundle report file that will be generated in `static` mode. Relative to bundle output directory (which is `output.path` in webpack config).|
|**`reportFilename`**|`{String}`|Default: `report.html`. Path to bundle report file that will be generated in `static` mode. Relative to bundle output directory (which is `output.path` in webpack config). Custom path example: `path/to/folder/report.html`. You can generate the `statsFileName` file outside of the bundle output directory by defining an absolute file path.|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New description says statsFileName, but it should be reportFilename, right?

Copy link
Collaborator

@th0r th0r Sep 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, maybe we can just say something like Path to bundle report file that will be generated in staticmode. It can be either an absolute path or a path relative to a bundle output directory (which isoutput.path in webpack config).?

@leonascimento
Copy link
Contributor Author

@th0r thank you very much for your help on this code review.
There is something that can I improve?

README.md Outdated
|**`defaultSizes`**|One of: `stat`, `parsed`, `gzip`|Default: `parsed`. Module sizes to show in report by default. [Size definitions](#size-definitions) section describes what these values mean.|
|**`openAnalyzer`**|`{Boolean}`|Default: `true`. Automatically open report in default browser.|
|**`generateStatsFile`**|`{Boolean}`|Default: `false`. If `true`, webpack stats JSON file will be generated in bundle output directory|
|**`statsFilename`**|`{String}`|Default: `stats.json`. Name of webpack stats JSON file that will be generated if `generateStatsFile` is `true`. Relative to bundle output directory.|
|**`statsFilename`**|`{String}`|Default: `stats.json`. Name of webpack stats JSON file that will be generated if `generateStatsFile` is `true`. Relative to bundle output directory. Custom: `path/to/folder/stats.json`. You can generate the `statsFileName` file outside of the bundle output directory defining the absolute file path.|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change it the same way as above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Thanks for your patience and advices.

This pull request should add that we can be able to
define the absolute paths to generate the statsFileName or
reportFileName.

Relates to webpack-contrib#186 webpack-contrib#185
@th0r th0r merged commit aad11d1 into webpack-contrib:master Sep 28, 2018
@th0r
Copy link
Collaborator

th0r commented Sep 28, 2018

Thanks, merged!

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 this pull request may close these issues.

None yet

4 participants