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

ykfe-cli

v1.0.3

Published

鱼快脚手架通用命令行工具

Downloads

5

Readme

鱼快前端通用命令行工具

安装

# 全局安装
npm i ykfe-cli -g

常用命令

  • 查看工具版本号
yk -V
  • 查看帮助
yk -h 
  • 根据模板生成文件
yk new XXX(模板名)
  • 本地开发调试时候使用yktest命令
yktest new XXX(模板名)

试用(查看样例)

# 根据命令行提示完成初始化
yk new example

如何制作一个模板

所有模板需存于git仓库http://192.168.28.114:8080/yk_njfe/team-libcli目录下

  1. 在工作目录新建一个文件夹 例如新建 vue-cli文件夹
  2. 将模板文件内容全部拷贝进去
  3. 如有package.json文件,需改名成_package.json(编译器会对package.json严格校验)
  4. 新建yk-cli.config.js文件,具体配置参数需见下方
  5. 根据ejs模板引擎规则,将模板文件进行修改,可参考http://192.168.28.114:8080/yk_njfe/team-lib/cli/example
  6. 修改完成后,可利用本地调试命令 yktest new vue-cli 测试其流程
  7. 本地开发完成后,将vue-cli文件夹拷贝至远程仓库http://192.168.28.114:8080/yk_njfe/team-lib/cli/

yk-cli.config.js参数说明

可参考http://192.168.28.114:8080/yk_njfe/team-lib/cli/example/yk-cli.config.js的写法

welcome [string]

当使用命令行工具初始化时候,给予用户初始化文案

questions [array]

配置问题列表,具体参考 https://www.npmjs.com/package/inquirer

rules [array]

默认项目中所有文件都会编译生成,如果你想针对不同场景来配置文件生成逻辑,可使用此配置 如:

{
      test: function (questions) {
        return !questions.needReadme
      },
      exclude: ['readme.md']
},

test函数返回true时,会排除exclude中指定的文件列表。其中exclude的文件路径使用的是glob模式https://www.npmjs.com/package/glob

templateSuffix [array]

当你的模板文件采用的是一些自定义格式时候,你需要在这里配置后缀名,以便编译器可以识别这些文件。如:tpl

ignore [array]

如果你想将一些文件排除在编译器之外,可以在这里配置,比如默认配置:['.svn', '.git']

备注

如果您有更多疑问请咨询: ykcl-fe.