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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@waterpack/wx-cli

v2.0.1

Published

微信小程序生成分包/页面/组件等文件夹脚手架,命令生成。

Readme

Usage: wx-cli [options][command]

Options:
-v --version output the version number
-h, --help display help for command

Commands:
create 创建页面/组件
env 选择开发环境
publish 发布体验版
help [command] display help for command

自定义配置

在根目录下新建wx.config.js

module.exports = {
  root: __dirname,
  dir_root: process.cwd(),
  entry: './',
  output: './',
  common: {
    // 钉钉通知
    DINGTALK_WARN_URL: {
      title: '钉钉报警URL',
      value:
        'https://oapi.dingtalk.com/robot/send?access_token=xxxxxxx',
    },
    atMobiles: ['188xxxxxxxx'],
  },
  env: {
    // 会自动更新小程序版本号
    relase: {
      A: {
        title: 'URL',
        value: 'www.baidu.com',
      },
    },
    pre: {
      A: {
        title: 'URL',
        value: 'www.baidu.com',
      },
    },
    pre2: {
      A: {
        title: 'URL',
        value: 'www.baidu.com',
      },
    },
    pre3: {
      A: {
        title: 'URL',
        value: 'www.baidu.com',
      },
    },
  },
};

创建包/组件

// 命令
wx-cli create

// 运行
? 选择你想生成的文件类型 (Use arrow keys)
❯ page 
  component 


? 选择你想生成的文件类型 page
? 设置page的名字(例如:index) w
? 设置页面所属的分包 (Use arrow keys or type to search)
❯ none 

修改开发环境

// 根据配置会输出配置的所有环境
wx-cli env

? 选择小程序的开发环境 (Use arrow keys)
❯ relase 
  pre 
  pre2 
  pre3 

relase为发布环境配置,会自动更新版本号


? Select increment (next version): (Use arrow keys)
❯ patch (1.0.4) 
  minor (1.1.0) 
  major (2.0.0) 
  prepatch (1.0.4-0) 
  preminor (1.1.0-0) 
  premajor (2.0.0-0) 
  Other, please specify... 

如果是其他环境则直接修改对应的配置

预览和发布体验版

wx-cli publish

? 选择要使用的功能 (Use arrow keys)
❯ preview 
  upload 

priview是生成测试版

测试版会把二维码保存在本地

upload上传体验版

直接上传体验版并触发钉钉通知

如果使用上传还需要获取上传key在小程序管理后台中获取

private.xxxxxxx.key

与小程序提供的ci使用方式一至