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

wechat-env

v1.0.0

Published

- env.yml 默认配置文件 - env.prod.yml 正式环境 - env.test.yml 测试环境

Readme

微信小程序环境变量配置

环境配置文件

  • env.yml 默认配置文件
  • env.prod.yml 正式环境
  • env.test.yml 测试环境

生成环境配置文件

  # 默认配置文件(读取 env.yml )
  wechat-env  

  # 正式环境,在根目录下创建 env.prod.yml ,env.prod.yml 与 env.yml 进行合并 merge(env.yml,env.prod.yml)  
  wechat-env -e prod

命令行

  # wechat-env 命令选项 
  wechat-env -h
  Options:
  -e, --envName [name]   默认读取文件名:env.yml
  -s, --savePath [path]  默认保存目录:miniprogram
  -n, --saveName [name]  默认保存文件名:env.config.ts
  -f, --flat [y/n]       第一层拉平:n

  # 指定环境配置文件
  wechat-env -e [prod]
  
  # 默认保存路径;根目录:miniprogram/env.config.ts
  wechat-env -s [miniprogram] 

  # 默认保存文件名称
  wechat-env -n [env.config.ts]
  
  # 第一层拉平
  wechat-env -f y

  # 完整命令
  wechat-env -e prod -s miniprogram -n env.config.ts -f y
  • wechat-env -f n 示例 (默认)
export default {
  "NODE_ENV": "development",
  "name": "wechat-env",
  "api": "http://wechat-env.xxmi.cn",
  "colors": [
    "red",
    "blue"
  ],
  "colorsList": [
    {
      "color": "red"
    }
  ]
}
  • wechat-env -f y 示例
export const NODE_ENV = "development"
export const name = "wechat-env"
export const api = "http://wechat-env.xxmi.cn"
export const colors = [
  "red",
  "blue"
]
export const colorsList = [
  {
    "color": "red"
  }
]

批量修改后缀名

  # 把所有 .wxss 结尾的改为 .scss 结尾
  re-suffix -b .wxss -a .scss

  Options:
  -b, --beforeSuffix [.wxss]  将要改的文件名后缀
  -a, --afterSuffix [.scss]   改变后的文件名后缀