Html 设置POSTSS的配置文件
我正在使用POSTSS,我想添加Post UNCS。我不使用任务运行程序,只使用POSTSS cli。My package.json现在看起来像这样:Html 设置POSTSS的配置文件,html,css,postcss,Html,Css,Postcss,我正在使用POSTSS,我想添加Post UNCS。我不使用任务运行程序,只使用POSTSS cli。My package.json现在看起来像这样: "css-clean": "npx postcss src\\css\\main.css -u autoprefixer --replace && npx postcss src\\css\\main.css -u css-declaration-sorter --replace --no-map" 时间越来越长了。我看到有人提
"css-clean": "npx postcss src\\css\\main.css -u autoprefixer --replace && npx postcss src\\css\\main.css -u css-declaration-sorter --replace --no-map"
时间越来越长了。我看到有人提到postsss可以有一个配置文件“postsss.config.js”。文章中唯一提到的是骨架:
module.exports = {
plugins: {
'autoprefixer': {},
'css-declaration-sorter': {}
}
};
uncss文档仅说明了选项:
{
html: ['index.html', 'about.html', 'team/*.html'],
ignore: ['.fade']
}
我希望如果有人有使用配置文件的经验,可以给我一些建议,因为我不相信这个特性有很好的文档记录 您可以在
postss.config.js
文件中传递插件参数,如下所示:
module.exports = {
plugins: [
require('module-name-1'),
require('module-name-2')({
option-a: 1,
option-b: "quoted value",
}),
],
};
谢谢你的意见。