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

mini-command

v1.0.2

Published

> 支持微信/百度/头条系 小程序开发者工具

Downloads

9

Readme

minicli 集成小程序命令行工具

支持微信/百度/头条系 小程序开发者工具

安装:

npm i -g mini-command

支持MAC环境各个小程序🔧,用命令行形式来进行预览和上传。

前提需要安装微信和头条开发者工具:

微信开发者工具需要在设置/安全设置/服务端口选择开启,才能使用命令行功能。

Commands

| 简介 | 简略模式 | Command | 参数 | | ---------------------- | ----------------------------------------- | :--------------------------------------------- | ------------------------------------------------------------ | | 微信命令行登录 | l.wx | login.wx | 无 | | 百度命令行登录 | l.sw <token> | login.swan | Token: 登录密钥 | | 头条命令行登录 | l.tt <phone> | login.tt <phone> | Phone: 手机号,或者手机号@验证码 | | 微信预览 | p.wx <project_path> -c [compile-path] | preview.wx <project_path> -c [compile-path] | project_path: 小程序打包目录(必填);compile-path:预览入口页面(选填) | | 头条预览 | p.tt <project_path> | preview.tt <project_path> | project_path: 小程序打包目录(必填) | | 百度预览 | p.sw <project_path> | preview.swan <project_path> | project_path: 小程序打包目录(必填) | | 微信上传 | u.wx <project_path> <version> -d [desc] | upload.wx <project_path> <version> -d [desc] | project_path: 小程序打包目录(必填);version:上传版本,1.0.0格式(必填);desc:版本描述(选填) | | 头条上传 | u.tt <project_path> <version> -d [desc] | upload.tt <project_path> <version> -d [desc] | project_path: 小程序打包目录(必填);version:上传版本,1.0.0格式(必填);desc:版本描述(选填) | | 百度上传 | u.sw <project_path> <version> -d [desc] | upload.sw <project_path> <version> -d [desc] | project_path: 小程序打包目录(必填);version:上传版本,1.0.0.0格式(必填);desc:版本描述(选填) | | 设置命令行工具所在目录 | sp | setpath | miniappType: 小程序类型,wx|tt,百度无此设置项;path:开发者命令行工具所在目录,头条命令行工具位于/<安装路径>/Contents/Resources/app.asar.unpacked/; 微信位于/<安装路径>/Contents/MacOS/ |

Usage

登录

预览和上传时必须处于登录状态,如果没有登录,会提示需先登录。

微信

minicli login.wx
# 简略:
minicli l.wx

头条

  1. 先输入手机号;

  2. 如果已经获取验证码,输入手机号@验证码,验证码在手机号后,用“@”分隔

minicli login.tt
# 简略
minicli l.tt

# 具体使用方式
# 1)输入手机号
minicli l.tt 176xxxxxxxx
# 2) 获取验证码后,输入手机验证码,验证码在手机号后输入,用'@'分隔
minicli l.tt 176xxxxxxxx@xxxx

百度

  1. 获取登录密钥:在百度智能小程序开发者工具(版本高于2.4.1)中登录后,可通过"菜单-关于-复制登录密钥"获取。

  2. 执行登录指令:

minicli login.swan TOKEN
# 简略
minicli l.sw TOKEN

预览

三种小程序基本一致:

# 微信
minicli p.wx <project_path>
# 头条
minicli p.tt <project_path>
# 百度
minicli p.sw <project_path>

<project_path>为小程序打包目录的路径。

微信可以设置预览入口页面,百度和头条不支持:

minicli p.wx <project_path> -c [compile-path]

例子:

# 微信
minicli p.wx ./dist -c 'pages/usercenter/usercenter?a=1&b=2'
# 头条
minicli p.tt ./dist
# 百度
minicli p.sw ./dist

上传

三种小程序基本一致:

# 微信
minicli u.wx <project_path> <version> -d [desc]
# 头条
minicli u.tt <project_path> <version> -d [desc]
# 百度
minicli u.sw <project_path> <version> -d [desc]

例子:

# 微信
minicli u.wx ./dist 1.2.0 -d '日常更新'
# 头条
minicli u.tt ./dist 1.2.0 -d '日常更新'
# 百度,百度的版本为4位
minicli u.sw ./dist 1.2.0.0 -d '日常更新'

设置命令行工具依赖路径

当默认的命令行工具路径出错时,需要自己设置下正确的路径。

# 设置微信命令行工具
minicli sp wx <cmd_path>
# 设置头条命令行工具
minicli sp wx <cmd_path>
  • 微信命令行工具所在位置:

macOS: /<安装路径>/Contents/MacOS/

Windows: /<安装路径>/

  • 头条命令行工具所在位置:

macOS: /<安装路径>/Contents/Resources/app.asar.unpacked/

Windows: /<安装路径>/resources/app.asar.unpacked/

例子:

# 设置微信命令行工具
minicli sp wx '/Applications/wechatwebdevtools.app/Contents/MacOS/'
# 设置头条命令行工具
minicli sp tt '/Applications/bytedanceide.app/Contents/Resources/app.asar.unpacked/'