I am utilizing CSS-PURGE to analyze CSS and provide feedback on potential improvements. In order to generate a report, I have configured it as follows:
{
"options": {
"generate_report": true,
"report_file_location": "purged_css_report_data.json"
}
}
To specify this configuration, I created a config_css.json
file in the project root directory. Then, I ran a test command from the same location:
css-purge -d -c ".color { color: #ffffff; color: #ff0000; }"
The documentation explains that the -d
parameter uses the default config file (config_css.json
).
I also attempted using the -f
parameter with both relative and absolute paths:
css-purge -f "config_css.json" -c ".color { color: #ffffff; color: #ff0000; }"
css-purge -f "/path/to/project/config_css.json" -c ".color { color: #ffffff; color: #ff0000; }“
Unfortunately, no report was generated and modifying the config JSON did not impact the execution. It seems that the config file is not being loaded correctly.
Is there an error in my setup preventing CSS-PURGE from generating a report, or could there be an issue on their end?