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 🙏

© 2025 – Pkg Stats / Ryan Hefner

wii-wxapp-cli

v1.0.16

Published

微信小程序脚手架功能完善-增加wiiui

Readme

wii-wxapp-cli

微信小程序脚手架

介绍

微信小程序脚手架可以用来快速搭建小程序框架,初始化小程序框架所需要的基本目录,同时可以用来拉取和更新公共组件和公共库,增强代码的可维护性,提高开发效率。

安装

npm install wii-wxapp-cli -g 

常用命令

  • 初始化小程序
    进入到项目目录中,执行wxapp init会自动在当前目录下生成对应的基本目录,同时,会自动初始化git,生成.git文件夹

    wxapp init
  • 创建模块
    创建模块会自动创建对应xxx目录以及该目录下的xxx.js、xxx.wxml、xxx.wxss、xxx.json文件,同时会在app.json中进行页面注册,需在项目根目录下执行此命令

    wxapp -p 模块名
  • 拉取/更新公共库
    拉取平台组提供的公共库utils,需在项目根目录下执行此命令

    wxapp pull utils
  • 拉取/更新公共组件
    拉取平台组提供的公共组件components,可根据命令行提示按需拉取某个组件或全部组件,需在项目根目录下执行此命令

    wxapp pull components
  • 提交公共库修改
    公共库维护者在项目中修改库后可直接将修改提交到公共库

    cd utils
    wxapp push utils <提交日志>
    或者
    cd utils
    按照常规的git操作进行代码提交
  • 提交公共组件修改
    公共组件维护者在项目中修改组件后可直接将修改提交到公共组件

    cd components/xxx
    wxapp push components <提交日志>
    或者
    cd components/xxx
    按照常规的git操作进行代码提交

查看版本

wxapp -V

克隆现有仓库的小程序项目

1.克隆带有公共组件和公共库的仓库
git clone  <url> --recursive
2.修改子组件的HEADER文件,将其指向master分支,参考http://mobile.51cto.com/aprogram-393324.htm
git submodule foreach git checkout master

初始化新项目

1.创建文件夹
mkdir xProject
2.初始化小程序代码
cd xProject
wxapp init
3.拉取小程序公共库
wxapp pull utils
4.按需拉取小程序公共组件
wxapp pull components
5.关联到远程仓库
git remote add origin <url>
6.发布到远程仓库
git add/commit/push

更新项目的公共库和公共组件

1.进入项目根目录
2.git submodule foreach git pull 

conf.js

conf.js是小程序的域名、部分接口配置文件,在小程序初始化时配置。 为了避免将域名、登录等接口通过脚手架的形式暴露出去,同时提供请求、登录等模块的封装,我们将部分项目相关的敏感信息放入conf.js。