wechat-devtool
Wechat Miniprogram Devtool CLI for NodeJS
Last updated 18 days ago by newfuture .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install wechat-devtool 
SYNC missed versions from official npm registry.

wechat-devtool npm version

Wechat Miniprogram Devtool CLI cross-platform wrapper for NodeJS and npm

跨平台命令行调用微信开发工具

Build Status Build Status

required 所需条件

  1. 已经安装 微信开发工具 devtools
  2. 开启开发工具的设置端口调用

中文: 打开工具 -> 设置 -> 安全设置,将服务端口开启。

English: open IDE -> Settings -> Security Settings, and set Service Port On.

quick start

免安装,命令行调用

官网 cli用法一致(额外功能是支持相对路径): 使用npx wechat-devtool代替cli即可

npx wechat-devtool
# 参数调用和原生CLI 参数完全一样 但是支持相对路径
npx wechat-devtool --open ./dist

快速上传

# 当前目录
npx -p wechat-devtool upload
# 上传 dist 目录
npx -p wechat-devtool upload ./dist
# 记录上传日志
npx -p wechat-devtool upload ./dist --upload-info-output

高级用法

npm install wechat-devtool -D

安装之后会添加其他命令到本地项目,可在 npm scripts 中直接调用

  • cli 等同于开发工具 CLI,更具系统和安装环境自动调用
  • upload 快速上传(对 upload 操作的简化) upload [[version@]path] [--upload-desc <desc>] [--upload-info-output <path>]

package.json 配置文件

{
  "scripts": {
    "upload": "upload ./dist",
    "cli": "cli"
  }
}

下面命令自动上传 dist 目录

npm run upload

JS 模块调用

作为 JS 模块使用

import { cli } from "wechat-devtool";

cli("-o")
  .then(console.log)
  .catch(console.error);

Current Tags

  • 1.2.7                                ...           latest (18 days ago)

18 Versions

  • 1.2.7                                ...           18 days ago
  • 1.2.6                                ...           18 days ago
  • 1.2.5                                ...           2 months ago
  • 1.2.4                                ...           2 months ago
  • 1.2.3                                ...           3 months ago
  • 1.2.2                                ...           3 months ago
  • 1.2.1                                ...           3 months ago
  • 1.2.0                                ...           3 months ago
  • 1.1.0                                ...           3 months ago
  • 1.0.3                                ...           3 months ago
  • 1.0.2                                ...           3 months ago
  • 1.0.2-beta                                ...           3 months ago
  • 1.0.1                                ...           3 months ago
  • 1.0.0                                ...           3 months ago
  • 0.1.0                                ...           3 months ago
  • 0.0.3                                ...           3 months ago
  • 0.0.2                                ...           3 months ago
  • 0.0.1                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 6
This Month 10
Last Day 1
Last Week 3
Last Month 89
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |