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

yzb-cli

v1.0.0

Published

yzb-cli for creating your projects

Downloads

2

Readme

yzb-cli

yzb-cli 可以快速为我们生成模板项目

Q: 为什么要使用 yzb-cli

yzb-cli 提供了 webpack, fis3, gulp 三大构建工具的模板项目, 帮你省去删删减减的重复操作

yzb-cli 让我们的项目更具统一性, 规范性

yzb-cli 生成的模板会不断更新底层支持, 通用性支持

全局安装

sudo npm install -g git+http://git.yizhibo.com/web-utils/yzb-cli.git

安装完终端输入 yzb-cli

  Usage: yzb-cli <command>

  Options:

    -V, --version  output the version number
    -h, --help     output usage information

  Commands:

    add|a          Add a new template
    list|l         List all the templates
    init|i         Generate a new project
    delete|d       Delete a template
    push|p         Push code remote repositories

功能

  • init
  • list
  • add
  • delete
  • push

关键词解释

  • Template Name 模板名称, init , add, delete 都是通过它来进行操作
  • Owner/Name 仓库所有者/仓库名 init 时根据 Owner/Name 进行 url 拼接进行clone
  • Branch 模板分支 init 时,默认拉取 master 分支上代码
  • Developer 模板开发者 add 时,会有 Developer 选项, 此项为必填项, 便于模板追踪
  • Doc 模板文档 add 时,会有 Doc 选项, 此项为必填项, 便于使用者快速上手

Init

初始化一个项目, 目前考虑提供 webpack, fis3, gulp 三大构建工具的版本, 后期会随着项目的多样性,功能的健全性增加及更新模板

yzb-cli init
? Template name: webpack-vue
? Project name: demo
? Where to init the project: ./
⠋ Downloading template...utils/template-webpack-vue
⠸ Downloading template...New project has been initialized successfully!

List

查看有效的模板列表

yzb-cli list
┌───────────────┬────────────────────────────────┬────────┬───────────────────┬─────────────────────────────────────────────────────────────────────────────┐
│ Template Name │ Owner/Name                     │ Branch │ Developer         │ Doc                                                                         │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ webpack-vue   │ web-utils/template-webpack-vue │ master │ [email protected] │ http://git.yizhibo.com/web-utils/template-webpack-vue/blob/master/README.md │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ fis           │ web-utils/template-fis         │ master │ [email protected] │ http://git.yizhibo.com/web-utils/template-fis/blob/master/README.md         │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ gulp          │ web-utils/template-gulp        │ master │ [email protected] │ http://git.yizhibo.com/web-utils/template-gulp/blob/master/README.md        │
└───────────────┴────────────────────────────────┴────────┴───────────────────┴─────────────────────────────────────────────────────────────────────────────┘

Add

添加模板

yzb-cli add
? Set the custom name of the template: test 
? Owner/name of the template: test
? Branch of the template: test
? Developer of the template: test
? Doc of the template: test
┌───────────────┬────────────────────────────────┬────────┬───────────────────┬─────────────────────────────────────────────────────────────────────────────┐
│ Template Name │ Owner/Name                     │ Branch │ Developer         │ Doc                                                                         │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ webpack-vue   │ web-utils/template-webpack-vue │ master │ [email protected] │ http://git.yizhibo.com/web-utils/template-webpack-vue/blob/master/README.md │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ fis           │ web-utils/template-fis         │ master │ [email protected] │ http://git.yizhibo.com/web-utils/template-fis/blob/master/README.md         │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ gulp          │ web-utils/template-gulp        │ master │ [email protected] │ http://git.yizhibo.com/web-utils/template-gulp/blob/master/README.md        │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ test          │ test                           │ test   │ test              │ test                                                                        │
└───────────────┴────────────────────────────────┴────────┴───────────────────┴─────────────────────────────────────────────────────────────────────────────┘
✔ New template has been added successfully!

Delete

删除模板

yzb-cli delete

? Which template you want to delete: test
┌───────────────┬────────────────────────────────┬────────┬───────────────────┬─────────────────────────────────────────────────────────────────────────────┐
│ Template Name │ Owner/Name                     │ Branch │ Developer         │ Doc                                                                         │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ webpack-vue   │ web-utils/template-webpack-vue │ master │ [email protected] │ http://git.yizhibo.com/web-utils/template-webpack-vue/blob/master/README.md │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ fis           │ web-utils/template-fis         │ master │ [email protected] │ http://git.yizhibo.com/web-utils/template-fis/blob/master/README.md         │
├───────────────┼────────────────────────────────┼────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ gulp          │ web-utils/template-gulp        │ master │ [email protected] │ http://git.yizhibo.com/web-utils/template-gulp/blob/master/README.md        │
└───────────────┴────────────────────────────────┴────────┴───────────────────┴─────────────────────────────────────────────────────────────────────────────┘
✔ Template has been deleted successfully!

Push

自动打包推送代码至static 及 tpl 的远程分支

首次使用会询问static及tpl本地开发路径, 按提示完成即可,这里需要注意的是tpl的路径只需要tpl文件夹下的任意子目录都行,static需要在fis3运行的具体目录

yzb-cli push [commitmessage]  // commitmessage 为必填项 为每次的提交的基本概要

? Set your static/repo relative path: /Users/yixia/Documents/web/static_yizhibo_com/html/app/loginLive/h5_source
? Set your tpl/repo relative path: /Users/yixia/Documents/web/tpl_yizhibo_com
cd /Users/yixia/Documents/web/static_yizhibo_com/html/app/loginLive/h5_source
exec fis3 release test

 [INFO] Currently running fis3 (/Users/yixia/.nvm/versions/node/v8.0.0/lib/node_modules/fis3/)

 Ω ............................................................................................................................................................................................................................................................................................................................ 709ms