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

waka-cli

v2.3.0

Published

A simple CLI scaffolding for front-end projects.

Downloads

6

Readme

README for English

waka

A simple CLI scaffolding for front-end projects.

安装

waka 依赖 Node.js (>=6.x):

$ mnpm install @mx/waka -g

如果没安装 mnpm,就用下面的命令安装 waka:

$ npm install @mx/waka -g --registry=http://r.npm.sankuai.com

用法

$ waka init <template-name> <project-name>

例如:

$ waka init vue-webpack my-project

上述命令会从 waka-templates/vue-webpack 拉取 vue-webpack 模板来初始化你的 ./my-project/ 项目。

基本命令

  • waka or waka -h --- 查看 waka 的帮助信息
  • waka list --- 列举所有官方模板。官方模板地址:waka-templates.
  • waka init template-name your-project-name --- 用指定的模板初始化你的项目.
  • waka tunnel --- 创建调试管道
  • waka token -u your-github-user-name -p your-personal-token --- 设置 auth token,用于 BA 认证。

waka listwaka init 命令都会向 api.github.com 发起请求。在没设置 auth token 的情况下,github限制的请求频率是 60次/小时,超过次数之后,github会拒绝请求,返回403。

而设置token后,请求频率是5000次/小时。

相关文档:

模板

Waka 提供了一些简单的官方模板。此外,也可以使用github上的第三方仓库作为模板或者使用自身本地的模板来初始化项目。

官方模板

所有的官方模板都可以从 waka-templates 上找到. 当有新模板添加时, 你能通过 waka init <template-name> <project-name> 来使用该模板, 也可以运行 waka list 来查看所有的模板.

即将能用的模板如下:

  • vue-webpack --- A simple template webpack + vuejs setup for projects
  • zepto-webpack --- A simple template webpack + zepto setup for projects
  • react-webpack --- A simple template webpack + react setup for projects

模板书写指南和样本:template-simple

利用他人的仓库作模板

waka 允许使用他人的 github repo 作为项目的模板:

waka init username/repo my-project

运行上述命令之后,将会使用 username/repo 作为模板来初始化你的项目。

本地模板

waka 支持使用本地模板初始化项目:

waka init ~/local/template/path my-project

模板书写指南和样本:template-simple

Note

如果你想为 waka 提供官方模板,请参照这份模板书写指南:官方模板书写指南

在指南中,官方模板必须符合两条规则:

  • 模板根目录下有 template 目录
  • 模板根目录下有 meta.{js,json} 文件

当你使用他人的github仓库或者本地模板时,如果github仓库或者本地模板的根目录没有 template 目录, waka 将会使用该仓库或者本地模板所在的目录作为渲染模板。

例如,你的本地模板目录是 ~/my-templates,如果 my-templates 下没有 template 目录,waka则会使用 my-templates 作为渲染模板。

Thanks

To metalsmith scaffolder for the head start.