Download postcss.config.js from abr00kx/taper: direct link, hf CLI and curl.
- Browser
- Download file 973 Bytes
-
https://huggingface.co/abr00kx/taper/resolve/main/postcss.config.js
- Command line
-
hf download hf://abr00kx/taper/postcss.config.js
-
curl -L -o postcss.config.js https://huggingface.co/abr00kx/taper/resolve/main/postcss.config.js
973 Bytes
| // Remove unused CSS selectors. | |
| const purgecss = require('@fullhuman/postcss-purgecss')({ | |
| content: [ | |
| // Use stats generated by Hugo from HTML content. | |
| './hugo_stats.json', | |
| // Add used JS scripts. | |
| process.env.HUGO_PUBLISHDIR + '/js/click-to-copy.min.*.js', | |
| process.env.HUGO_PUBLISHDIR + '/js/main.min.*.js', | |
| ], | |
| extractors: [ | |
| { | |
| extractor: (content) => { | |
| let els = JSON.parse(content).htmlElements; | |
| return els.tags.concat(els.classes, els.ids); | |
| }, | |
| extensions: ["json"], | |
| }, | |
| ], | |
| // As these classes are only applied by JavaScript, PurgeCSS doesn't see them | |
| // in the source code and removes them unless we explicitly tell it not to. | |
| safelist: ['version-picker-selected', 'version-picker-latest'] | |
| }); | |
| module.exports = { | |
| plugins: [ | |
| ...(process.env.HUGO_ENVIRONMENT === 'production' ? [ purgecss ] : []) | |
| ] | |
| }; | |