wxml-minifier
微信小程序WXML压缩工具
Last updated 4 years ago by leejim .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install wxml-minifier 
SYNC missed versions from official npm registry.

image

npm npm NPM coverage

wxml-minifier

微信小程序 WXML 压缩工具

安装

npm i -D wxml-minifier

使用

minifier(resource[, options])

基础使用

const minifier = require('wxml-minifier')
const wxmlStr = `
<view class="home"         >
<!-- test -->
</view>
`
const minified = minifier(wxmlStr)

console.log(minified) // <view class="home></view>

选项

名称 类型 默认值 功能
whitespace Boolean true 移除 wxml 多余的空格
comment Boolean true 移除所有的注释

Current Tags

  • 0.0.7                                ...           latest (4 years ago)

7 Versions

  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |