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

create-components-skeleton

v1.0.0

Published

React组件库生成脚手架,通过交互式命令从github中下载代码生成新项目

Readme

zw-cli

通过交互式命令从github中下载代码生成新项目-学习记

使用姿势

  • 全局安装npm i zw-vue-cli -g
  • 在项目目录下运行命令zwcli
  • 更加提示输入项目名称和版本号即可

参考文档

为什么要学习这个

看vue-cli可以用交互式的命令来生成一个项目感觉很好玩,所以我也来学学如何做。一下实现的功能其实一行命令就能解决(git clone --depth=1 https://github.com/ant-design/ant-design-pro.git my-project)

我要实现什么功能

通过在命令行交互式输入项目名、版本号、选择模板地址后远程(github/gitlab)拉取代码到本地并创建项目.

什么都不懂,如何开始

搜索到了一篇Node.js 命令行程序开发教程,瞬间就有了方向。

具体做什么

  • 像vue-cli那样输入命令 vue create hello-world就能开始执行交互程序。
  • 交互式命令行
  • 远程拉取项目到本地
  • 修改package.json文件中的name和版本号

怎么做

  • 像vue-cli那样输入命令 vue create hello-world就能开始执行交互程序

Node.js 命令行程序开发教程-可执行脚本中学到, 可以在package.json文件中的bin下面设置命令,然后通过npm link就可将命令加入到环境变量中,像下面这样配置 运行zwcli就会执行"bin/create-zw-template"脚本。相当于执行node bin/create-zw-template(记得npm link, npm unlink是用来设置刚才的删除环境变量的)

  • 交互式命令行

使用NodeJs交互式命令行工具inquirer来实现交互式命令。 - 首先编写问题 - 获取问答结果

为了更好的用户体验我们需要引入Ora 在控制台显示当前加载状态的,来让加载过程更直观好像点

  • 拉取代码后,修改package.json文件 使用node自带的api就行