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

@lin.shi/gkit-cli

v2.0.1

Published

创建一个自己的前端脚手架工具

Downloads

1

Readme

创建自己的脚手架工具

  • v2.0.0版本 支持模板环境 node 16.14.0
  • 本项目工具还在完善中

预计实现的功能

  • 实现可以在命令行中直接运行代码 
  • 实现可以用npm安装 npm install gkit-cli -g
  • 根据模板初始化项目 gkit-cli create project-name
  • 模板库代码拉取初始化配置文件 gkit-cli config set url http://172.16.65.145/techplatform/cet-ui-public.git

本项目工具cli已经实现

增加:

| command | alias | example | | :-------|:-------| :--------------- |
| create | c | gkit-cli create projectName | | create | c | gkit create projectName | | config | conf | gkit-cli config set url http://172.16.65.145/techplatform/gkit-ui-public.git| | config | conf | gkit-cli config get url |

本项目中需要很多的模块

  • nodejs:整个脚手架工具的根本组成部分,推荐使用最新的版本。
  • ES6:新版本的node.js对于es6的支持度已经非常高,使用es6能够极大地提升开发效率和开发感受。
  • commander:开发的工具,能够更好地组织和处理命令行的输入。参数解析 --help其实就借助了他~ 解析用户输入的命令。
  • consolidate:统一模板引擎
  • inquirer:交互式命令行工具,用于向用户提出问题和获取回答。
  • download-git-repo:拉取GitHub上的文件
  • chalk:改变命令行打印内容的样式
  • ora:小图标 (loading、succeed、warn等)
  • metalsmith:读取所有文件,实现模板渲染。
  • child_process:nodejs子进程模块,可以创建子进程,执行若干任务。

项目目录结构

|---bin #
| |-- www # 全局命令执行的根文件
|---src #
| |-- utils # 存放工具方法
| | |-- constants.js # 存放用户所需要的常量
| | |-- common.js # (未使用)
| |-- main.js # 入口文件
| |-- create.js # create 命令所有逻辑
| |-- config.js # config 命令所有逻辑
|---.eslintrc.js # 代码规范
|---.projectUrl # 生成文件,设置下载项目URL,如不设置会默认地址
|---package.json #
|---README.md #

打包发布到npm

  npm unlink
  npm login
  npm publish
  npm i gkit-cli -g

需注意

完善中...