New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

weex-lint

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weex-lint

Diagnose weex file

0.1.10
latest
Version published
Maintainers
1
Created

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

Keywords

FAQs

Package last updated on 09 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts