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

gy-common-cli

v1.3.3

Published

一个快速构建中、后台项目的脚手架

Downloads

10

Readme

gy-common-cli -

一个快速构建中、后台项目的脚手架

特性

  • 快速构建一个配置有严格的开发规范的项目
  • 自由的配置选择
  • 初始化配置可选择
  • 详细的命令行 log 提示

快速使用

全局下载 gy-common-cli,运行以下命令来创建一个新项目:

npm i gy-common-cli -g

gy-cli create hello-world

命令示例

gy-cli create hello-world -d

-d, --default 忽略提示符并使用默认预设选项

这个默认的设置非常适合快速创建一个新项目的原型,而手动设置则提供了更多的选项,它们是面向生产的项目更加需要的。

创建一个项目

运行以下命令来创建一个新项目:


gy-cli create hello-world

你会被提示选取一个预设的项目,默认将拉取包含全部组件及示例的项目

step

选择完成模板后将提示键入项目名称,该名称将会设置为package.json的 name 属性的值,不输入则采用默认值

step

之后将会去远程仓库拉取代码,生成项目,项目拉取完毕后提示采用何种方式下载依赖

注意:建议手动下载依赖

step

至此项目创建完毕

step

添加一个模板


gy-cli add test

将提示选择一个组件模板,从远程仓库中下载,下载完成后将命名为 test,放置于 src/compoments 目录中

如果 src/compoments 目录中存在 名字为 test 的文件,则提示重新输入文件名称

如果 src 或者 compoments 目录不存在,则将创建这两个目录

step

step

注意:该命令仅生成模板组件,具体引用通过手动配置

使用图形化界面

你也可以通过 gy-cli ui 命令以图形化界面创建模板组件:


gy-cli start

命令将启动一个服务:http://localhost:8087

在浏览器打开 http://localhost:8087,将以图形化界面将你引导至创建模板组件的流程。

step

注意:将会创建在当前启动命令的目中,注意执行命令的位置


帮助和更多

gy-cli 命令有一些可选项,你可以通过运行以下命令进行探索:


gy-cli create --help
用法:create [options] <app-name>

创建一个由 `gy-common-cli` 提供支持的新项目

版本记录

  • 1.0.0 初始化项目,一行命令拉取基础模板
  • 1.0.1 增加目录覆盖检测
  • 1.0.2 更换远程模板项目地址,使用 GitLab 作为模板仓库
  • 1.0.3 支持项目配置,可选拉取多个项目
  • 1.0.4 支持命令选择 npm、cnpm 或手动下载依赖
  • 1.0.5 更友好的命令提示
  • 1.1.0 增加 add \ start 命令,远程下载单个模板,增加下载模板可视化界面
  • 1.2.2 新的 UI 界面,增加组件模板选择,支持下载多文件组件
  • 1.3.2 UI 界面增加项目模板选择,支持下载项目模板
  • 1.3.3 UI UI 界面增加加载动画

License

MIT