weapp-ide-cli 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +10 -1
  2. package/dist/cli.js +7 -6
  3. package/package.json +3 -1
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  微信开发者工具的命令行(v2) 的一个二次封装的包裹实现,来让开发者更加方便的使用微信开发者工具。
4
4
 
5
5
  > 要使用命令行,注意首先需要在开发者工具的设置 -> 安全设置中开启服务端口。
6
- ## 快速使用
6
+ ## 快速安装
7
7
 
8
8
  ```bash
9
9
  npm i -g weapp-ide-cli
@@ -30,6 +30,15 @@ weapp open -p dist/dev/mp-weixin
30
30
  # 工具会把它转化为绝对路径,然后打开
31
31
  ```
32
32
 
33
+ ## 常用命令
34
+
35
+ 1. `weapp login` 在命令行进行微信扫码登录
36
+ 2. `weapp open -p` 启动工具进行调试开发
37
+ 3. `weapp preview` 开始预览
38
+ 4. `weapp upload` 上传代码
39
+ 5. `weapp quit` 关闭开发者工具
40
+
41
+
33
42
  ### 自定义配置
34
43
 
35
44
  `weapp config` 可以对微信开发者工具的 `cli` 目录进行配置,而配置文件就存放在用户的 `${homedir}/.weapp-ide-cli/config.json` 中,您可以随时进行更改。
package/dist/cli.js CHANGED
@@ -41,7 +41,7 @@ function getConfig() {
41
41
  encoding: 'utf8'
42
42
  });
43
43
  const config = JSON.parse(content);
44
- console.log('自定义Cli路径:', config.cliPath);
44
+ console.log('自定义cli路径:', config.cliPath);
45
45
  return config;
46
46
  }
47
47
  else {
@@ -52,12 +52,12 @@ function getConfig() {
52
52
  });
53
53
  }
54
54
  function rlSetConfig() {
55
- console.log('请设置微信web开发者工具 cli 的路径:');
56
- console.log('提示:命令行工具默认所在位置:');
57
- console.log('macOS: <安装路径>/Contents/MacOS/cli');
58
- console.log('Windows: <安装路径>/cli.bat');
55
+ console.log('请设置微信web开发者工具 cli 的路径');
56
+ console.log('> 提示:命令行工具默认所在位置:');
57
+ console.log('- MacOS: <安装路径>/Contents/MacOS/cli');
58
+ console.log('- Windows: <安装路径>/cli.bat');
59
59
  return new Promise((resolve, reject) => {
60
- rl.question('请输入微信web开发者工具 cli 的路径:', (cliPath) => utils.__awaiter(this, void 0, void 0, function* () {
60
+ rl.question('请输入微信web开发者工具cli路径:', (cliPath) => utils.__awaiter(this, void 0, void 0, function* () {
61
61
  yield createCustomConfig({
62
62
  cliPath
63
63
  });
@@ -101,6 +101,7 @@ function main() {
101
101
  yield task;
102
102
  }
103
103
  else {
104
+ console.log('在当前自定义路径中,未找到微信web开发者命令行工具,请重新指定路径');
104
105
  yield rlSetConfig();
105
106
  }
106
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weapp-ide-cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "让微信开发者工具,用起来更加方便吧!",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -26,6 +26,8 @@
26
26
  },
27
27
  "keywords": [
28
28
  "weapp",
29
+ "weapp-cli",
30
+ "wechat",
29
31
  "cli",
30
32
  "uni-app",
31
33
  "taro",