fis3-deploy-html-minifier
A fis3 plugin to compress file with html-minifier on deploy stage.
Thanks for fis3-deploy-i18n-template
在前端的工程构建工具FIS3发布阶段,将modified
中命中templatePattern
规则,或者未设置templatePattern
,但是拥有isHtmlLike: true
的文件,使用 html-minifier 进行压缩。
使用说明
如何安装
yarn add fis3-deploy-html-minifier -D# OR npm install fis3-deploy-html-minifier -D
默认配置
/** * @type * @property * @property * @property */ templatePattern: '' ignorePattern: '' ...minifierOptions;
参考示例
具体的实验可以参考这个项目fis3-examples。
项目目录结构
# project root path
│
├── template-folder
│ ├── index.html
│ ├── _not_compress.html
│ ├── ...
│ └── sub-folder
│ ├── detail.html
│ └── ...
│
├── fis-conf.js
│
└── package.json
fis-conf.js
中fis3-deploy-html-minifier
相关的内容
配置// ------ templates ------fis;fis;// ------ deploy ------fis;
参考
- node-project-kit - 快速创建项目的模板
- glob - 使用 glob 语法获取匹配文件的工具
- html-minifier - html 压缩工具
License
Copyright © 2017-present. This source code is licensed under the MIT license found in the LICENSE file.
Made by Tony (blog)