weex-lint

0.1.10 • Public • Published

Weex Lint

提醒:请使用 tnpm 安装,新版本并不会发布到 npm 中。

校验 .we 文件或者 JS Bundle 是否符合规范。

使用方法

安装:

tnpm install @ali/weex-lint -g

使用 cli:

weex-lint example.we

在 node.js 程序中使用:

var weexLint = require('weex-lint')
 
weexLint('filePath_or_URL')
  .then(function(result) {
    // 输出校验报告的函数
    result.reporter(result.record)
 
    // 获取结果报告的 JSON 字符串
    result.toJSON()
  })

详细的使用方法请参考:《Use it in node.js》

特性

  • 支持校验 .we 格式的 weex 组件文件。
  • 支持校验编译&压缩后的 js bundle 文件。
  • 支持通过 URL 指定待校验的文件。
# 校验本地 .we 文件 
weex-lint src/index.we
 
# 校验本地打包好的 js bundle 
weex-lint dist/index.js
 
# 校验远端 .we 原文件 
weex-lint https://x.com/src/demo.we
 
# 校验远端压缩后的 js bundle 
weex-lint http://x.com/dist/demo.min.js

Readme

Keywords

Package Sidebar

Install

npm i weex-lint

Weekly Downloads

0

Version

0.1.10

License

MIT

Last publish

Collaborators

  • tancy
  • hanks
  • erha19