Open Kristinita opened 2 years ago
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is still relevant.
Thanks.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is still relevant.
Thanks.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is still relevant.
Thanks.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is still relevant.
Thanks.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is still relevant.
Thanks.
1. Summary
It would be nice, if PurgeCSS automatically generated a list of HTML for
content
key, based onfiles
settings.2. Example of desired behavior
Example of desired
purgecss.coffee
configuration for Grunt:When I run command:
PurgeCSS will search all files in my
output/**/*.html
that containtheme/css/KiraExampleTheme.css
. Styles can be added in a variety of ways:If HTML file contains
theme/css/KiraExampleTheme.css
added by any method, PurgeCSS add this file to the list — the value ofcontent
key.For example, 2 of my files in
**/*.html
containtheme/css/KiraExampleTheme.css
—output/KiraFirstFolder/KiraFirstExample.html
andoutput/KiraFolderSecond/KiraExampleSecond.html
. PurgeCSS will treat these 2 files as key of value"content"
. That is, PurgeCSS will work as if the configuration were:3. Reasons for the desirability of feature
3.1. Automation
Currently, users are forced to manually add values for the
content
key. This takes a lot of time, especially if the site is large.Also, as changes are made to the site, PurgeCSS users have to constantly check the values of the
content
key. It also takes time.3.2. Accuracy
Errors can occur when manually adding values for the
content
key. The user may not add the necessary HTML files, or vice versa, add extra files. The user may forget to make changes to the PurgeCSS configuration after making changes to the site.Automatic generation of values of the
content
key would prevent such user errors.Thanks.