npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

weappdevtools-cli

v1.1.0

Published

微信小程序开发者工具命令行小秘书

Downloads

21

Readme

weappdevtools-cli

NPM version changelog license

微信小程序开发者工具命令行小秘书

Why

通过工具规范化微信小程序上传代码时需要人为填写的 版本号备注 upload-example

  • 生成的 版本号 规则
    • 尝试读取微信小程序项目根目录下的 package.json 文件中的版本号
    • 尝试读取微信小程序项目 GIT 最后提交的日志的 hash 值
    • 组合: ${pkg.version}.${hash}.${env}
    • 例如: 1.0.0.7004c7b.prod
  • 生成的 备注 规则
    • 读取命令行中传入的环境参数: --env
    • 读取命令行中传入的备注参数: --desc
    • 组合: env: ${env} ${desc}
    • 例如: env: test 补充信息

Installation

npm install weappdevtools-cli -g

Example usage

upload

cd /path/to/weapp-project-root-dir
weappdevtools-cli upload --env=test

or

weappdevtools-cli upload --projectRoot=/path/to/weapp-project-root-dir --env=test
√ Get last commit log: {"hash":"7004c7bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","date":"2018-09-28 13:42:26 +0800","message":"","author_name":"","author_email":""}
√ Find wechatdevtools process: {"name":"wechatdevtools.exe","pid":26096,"path":"E:\\Program Files\\Tencent\\微信web开发者工具\\wechatdevtools.exe"}
--------------------------
Use wechatdevtools cli: E:\Program Files\Tencent\微信web开发者工具\cli.bat
--------------------------
--------------------------
> cli.bat -u 1.0.0.7004c7b@E:\a\b\c\fe-weapp-xxx --upload-desc "env: test" --upload-info-output "E:\a\b\c\fe-weapp-xxx\upload-info.json"
--------------------------
Initializing...

idePortFile: C:\Users\xx\AppData\Local\微信web开发者工具\User Data\Default\.ide

IDE server has started, listening on http://127.0.0.1:60233
initialization finished
uploading project...
upload success

--------------------------
┌─────────────────────┬───────────────────────┬────────────────────┬────────────┐
│ 时间                │ 项目                   │ 版本号             │ 项目备注   │
├─────────────────────┼───────────────────────┼────────────────────┼────────────┤
│ 2018-12-26 11:45:26 │ E:\a\b\c\fe-weapp-xxx │ 1.0.0.7004c7b.test │ env: test  │
└─────────────────────┴───────────────────────┴────────────────────┴────────────┘
--------------------------
本次上传的额外信息: {"size":{"total":408.67,"packages":[{"name":"__FULL__","size":408.67}]}}

preview

weappdevtools-cli preview --projectRoot=/path/to/weapp-project-root-dir
√ Find wechatdevtools process: {"name":"wechatdevtools.exe","pid":26096,"path":"E:\\Program Files\\Tencent\\微信web开发者工具\\wechatdevtools.exe"}
--------------------------
Use wechatdevtools cli: E:\Program Files\Tencent\微信web开发者工具\cli.bat
--------------------------
--------------------------
> cli.bat -p E:\a\b\c\fe-weapp-xxx --preview-info-output "E:\a\b\c\fe-weapp-xxx\preview-info.json"
--------------------------
Initializing...

idePortFile: C:\Users\xx\AppData\Local\微信web开发者工具\User Data\Default\.ide

IDE server has started, listening on http://127.0.0.1:60233

initialization finished
preparing preview...
[qrcode]
preview success

--------------------------
本次预览的额外信息: {"size":{"total":408.67,"packages":[{"name":"__FULL__","size":408.67}]}}

Notice

  • 需要将开发者工具的设置-安全设置-服务端口打开
  • 需要将目标项目从"微信web开发者工具"中删除掉一次(执行命令后会自动再加上该项目)
  • 如果你的项目的开发模式非微信小程序原生的开发模式, 例如使用了 min 或者其他(wepy/mpvue/taro/...)