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

zqs-cli

v0.1.0

Published

Downloads

2

Readme

创建自己的脚手架工具

预计实现的功能

  •  实现可以在命令行中直接运行代码 
  • 实现可以用npm安装 npm install zqs-cli -g
  • 根据模板初始化项目 zqs-cli create <project-name>
  • 查看模板库配置 lee-cli config
  • 模板库配置 lee-cli config set

本项目工具cli已经实现

 zqs-cli create <projectName>

create可以生成一个项目,会询问用户配置项:

config命令已经配置

zqs-cli config
zqs-cli config set

举例: zqs-cli config zqs-cli config set

本项目中需要很多的模块

  • commander.js,可以自动的解析命令和参数,用于处理用户输入的命令。
  • download-git-repo,下载并提取 git 仓库,用于下载项目模板。
  • inquirer.js,通用的命令行用户界面集合,用于和用户进行交互。
  • handlebars.js,模板引擎,将用户提交的信息动态填充到文件中。---暂时还没有用到
  • ora,下载过程久的话,可以用于显示下载中的动画效果。
  • chalk,可以给终端的字体加上颜色。
  • log-symbols,可以在终端上显示出 √ 或 × 等的图标。
  • metalsmith :读取所有文件,实现模板渲染
  • consolidate :统一模板引擎

打包发布到npm

  npm unlink
  zqs-cli
  npm i zqs-cli -g

需注意

本代码中是针对自己的https://api.github.com/orgs/zqs-cli/repos的组织写的自定义的脚手架,参考价值是代码的思路分析,可将里边的链接地址更换为自己的,如果是简单的项目拷贝只需要更改链接地址,如果是负责的项目需要定制的话可以根据自己的逻辑修改,本项目中的src/utils/common.js 中的方法 copyTempToLoclhost 里边的复杂方法也是针对自己的项目编写的。 当然在一直优化中。。。。