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 info-verbosity into json schema #249

Closed
EugeneHlushko opened this issue Jan 23, 2018 · 7 comments · Fixed by #264
Closed

Add info-verbosity into json schema #249

EugeneHlushko opened this issue Jan 23, 2018 · 7 comments · Fixed by #264

Comments

@EugeneHlushko
Copy link
Member

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

Feature

What is the current behavior?
info-verbosity enum range is set within the code

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

What is the expected behavior?
info-verbosity enum is set in the schema, so there is no validation for it outside of validateOptions
If this is a feature request, what is motivation or use case for changing the behavior?
We are adding this option before json schema landed, but PR is there and should go in soon.

Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.

Work can be started when #240 lands into master

@abiduzz420
Copy link

abiduzz420 commented Jan 30, 2018

I shall take this up and subscribe to #240 PR, accordingly work on this issue.

@evenstensberg
Copy link
Member

Nice!

@evenstensberg
Copy link
Member

Here to help if you need anything :)

@EugeneHlushko
Copy link
Member Author

On the other hand, looking again at the code @ev1stensberg
i think that we cannot move this to webpackConfigurationSchema as it is not part of the options but actually a part of outputOptions. Having another validation step for output options maybe and a separate json file? but in that case it will duplicate information from these rows:

webpack-cli/bin/webpack.js

Lines 65 to 197 in a15807b

silent: {
type: "boolean",
describe: "Prevent output from being displayed in stdout"
},
json: {
type: "boolean",
alias: "j",
describe: "Prints the result as JSON."
},
progress: {
type: "boolean",
describe: "Print compilation progress in percentage",
group: BASIC_GROUP
},
color: {
type: "boolean",
alias: "colors",
default: function supportsColor() {
return require("supports-color");
},
group: DISPLAY_GROUP,
describe: "Enables/Disables colors on the console"
},
"sort-modules-by": {
type: "string",
group: DISPLAY_GROUP,
describe: "Sorts the modules list by property in module"
},
"sort-chunks-by": {
type: "string",
group: DISPLAY_GROUP,
describe: "Sorts the chunks list by property in chunk"
},
"sort-assets-by": {
type: "string",
group: DISPLAY_GROUP,
describe: "Sorts the assets list by property in asset"
},
"hide-modules": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Hides info about modules"
},
"display-exclude": {
type: "string",
group: DISPLAY_GROUP,
describe: "Exclude modules in the output"
},
"display-modules": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display even excluded modules in the output"
},
"display-max-modules": {
type: "number",
group: DISPLAY_GROUP,
describe: "Sets the maximum number of visible modules in output"
},
"display-chunks": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display chunks in the output"
},
"display-entrypoints": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display entry points in the output"
},
"display-origins": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display origins of chunks in the output"
},
"display-cached": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display also cached modules in the output"
},
"display-cached-assets": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display also cached assets in the output"
},
"display-reasons": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display reasons about module inclusion in the output"
},
"display-depth": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display distance from entry point for each module"
},
"display-used-exports": {
type: "boolean",
group: DISPLAY_GROUP,
describe:
"Display information about used exports in modules (Tree Shaking)"
},
"display-provided-exports": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display information about exports provided from modules"
},
"display-optimization-bailout": {
type: "boolean",
group: DISPLAY_GROUP,
describe:
"Display information about why optimization bailed out for modules"
},
"display-error-details": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display details about errors"
},
display: {
type: "string",
group: DISPLAY_GROUP,
describe:
"Select display preset (verbose, detailed, normal, minimal, errors-only, none)"
},
verbose: {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Show more details"
},
"info-verbosity": {
type: "string",
default: "info",
group: DISPLAY_GROUP,
describe:
"Controls the output of lifecycle messaging e.g. Started watching files... (verbose, info, none)"
}

Sorry for late reply @abiduzz420 i would like to finish my code so i will work on this issue.

@evenstensberg
Copy link
Member

Separate configuration file is not good, would prefer it to be compact.

@EugeneHlushko
Copy link
Member Author

In that case it should be out of outputOptions and go to options which gets validated against the schema. Any thoughts or objections?
cc @sokra @ev1stensberg

@evenstensberg
Copy link
Member

Send a PR, I'll review to see if its a nice thing to have in there 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants