purifycss-webpack
purifycss-webpack copied to clipboard
Push option descriptions to JSON schema
There should be a mechanism that would write the readme table based on the fields and their descriptions. This is likely something that should be tackled in webpack-defaults first.
I can take a look at this soon, we could use the description(s) from options.json (Validation Schema) and add a new var ${options.option.desc} to the readme task in webpack-defaults
dist/options.json
{
"type": "object",
"properties": {
"option": {
"type": "boolean",
"default": false,
"description": "lorem ..."
}
},
"additionalProperties": false
}
README#Options
|Name|Type|Default|Description|
|:----:|:----:|:------:|:-----------|
|${options.option}|${options.option.type}|options.option.default|${options.option.description}|
The default in schema-utilsmight be tricky since the respective option must be always 'set' then, but I didn't invest any time in checking out possible options eventually avoid this yet tbh 😛
@michael-ciniawsky Yeah, it's the same problem for each loader/plugin. We should solve this properly once, push the solution to defaults, and replicate.