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

miniapp-cli

v0.0.6

Published

A scaffold for wechat mini appplication, surpport multiple pre-complie language, to quickly build your application.

Downloads

4

Readme

miniapp-cli

微信小程序脚手架工具

miniapp-cli支持你使用jade,sass/scss/stylus/coffee来编写微信小程序,并编译成小程序原生的wxml,wxss,js。这听起来就非常酷对吧!除此之外,miniapp-cli还提供了生成小程序page模板的功能,帮助你快速开发微信小程序。

安装

    $ npm install miniapp-cli -g

查看帮助

    $ miniapp-cli -h

创建项目

    $ miniapp-cli new your_app_name

new命令可以为你快速生成一个初始化的小程序项目,并为你自动安装其中的默认npm package依赖。 执行此命令后,你需要选择wxmlwxsswxs的预编译方式。

wxml 支持的预编译方式

  • wxml (不使用预编译)
  • pug(即jade)

wxss 支持的预编译方式

  • wxss (不使用预编译)
  • sass
  • scss
  • stylus

wxs 支持的预编译方式

  • babel(ES6->ES5)
  • coffeescript

your_app_name文件夹中,有两个主要目录,srcdist,前者是你的工作目录,后者是通过miniapp-cli编译生成的小程序,你可以通过微信小程序官网提供的开发者工具链接本地开发目录至dist,就可以实现实时预览了。

编译

通过build来编译小程序项目

    $ cd your_app_name
    $ miniapp-cli build

同时你还可以加上 -w 参数,以监测文件改动从而自动编译

    $ miniapp-cli build -w

Page模板生成

通过g 来快速生成page,执行

    $ miniapp-cli g page_name folder

当文件夹名称folder省略时,默认是page_name值,folder也可以是路径名, 将会自动在 src/pagesdist/pages 目录中生成对应 folder 文件路径,并生成基本的文件结构

  • page_name.js
  • page_name.wxml
  • page_name.wxss
  • page_name.json

除此之外,还会自动将page添加到app.json中的pages定义。

其它

本项目是在 miniapps 基础上开发,以满足个性化需求,对此表示感谢!

License

MIT