Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 设置POSTSS的配置文件_Html_Css_Postcss - Fatal编程技术网

Html 设置POSTSS的配置文件

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" 时间越来越长了。我看到有人提

我正在使用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"
时间越来越长了。我看到有人提到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",
        }),
    ],
 };

谢谢你的意见。