You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
content: [], // files to extract the selectors from
51
51
css: [], // css
52
52
extractors: [
53
53
{
54
-
extractor:purgeJs,
55
-
extensions: ["js"],
54
+
extractor:purgeCSSFromPug,
55
+
extensions: ["pug"],
56
56
},
57
57
{
58
-
extractor:purgeHtml,
58
+
extractor:purgeCSSFromHtml,
59
59
extensions: ["html"],
60
60
},
61
61
],
@@ -67,6 +67,21 @@ export default options;
67
67
68
68
An extractor is a simple function that takes the content of a file as a string and returns an array of selectors. By convention, the name of the npm package is `purgecss-from-[typefile]`\(e.g. purgecss-from-pug\). Using this convention will allow users to look at the list of extractor on npm by searching `purgecss-from`.
69
69
70
+
The function can returns either an array of selectors (tags, classes, ids) or the object below for better accuracy:
A PurgeCSS extractor for PUG files that automatically generates a list of used CSS selectors from your PUG files. This extractor can be used with PurgeCSS to eliminate unused CSS and reduce the size of your production builds.
0 commit comments