html-compress

0.0.4 • Public • Published

html compress..

对html以及smarty模板进行压缩

安装

npm install html-compress

使用方法

载入模块

var xss = require('html-compress');

设置配置参数

 
var option = {
    'level' : 'strip',   //压缩等级分为strip、strip_comment、strip_space,默认为strip
    'leftDelimiter' : '{%', //模板左界定符
    'rightDelimiter' : '%}' //模板右界定符
};
var HtmlCompress = require('html-compress');
var content = HtmlCompress.compress(htmlcontent,option); //传入html字符串进行压缩

测试

系统测试

在源码目录执行命令:npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    158
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    158
  • 0.0.3
    0
  • 0.0.2
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i html-compress

Weekly Downloads

159

Version

0.0.4

License

none

Last publish

Collaborators

  • yuanfang
  • fansekey