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

@devotee/cli

v0.1.8

Published

Code deployment

Downloads

12

Readme

cli 指令列表

| 指令名称 | 参数 | 说明 | | -------- | --------- | ----------------------------------- | | create | | 创建一个新的项目 | | api | [options] | 根据页面路由生成对应的 Api 接口文件 | | menu | [options] | 根据页面路由生成一个组合列表文件 | | view | [options] | 根据页面路由生成对应的 Vue 视图文件 | | mock | [options] | 根据页面路由生成测试数据 | | mysql | [options] | 根据页面路由生成菜单列表 mysql | | router | [options] | 生成 VueRouter 路由文件 | | coding | [options] | 汇总项目代码到一个文件中 | | list | [options] | 查看远程文件列表 | | upload | [options] | 代码部署到服务器 | | remove | [options] | 移除远程服务器文件 | | download | [options] | 远程文件同步到本地 |

  1. 创建项目

    tri create my-app // 创建一个名字为my-app的项目

    输入命令后会出现选项,选择项目类型 ==》 项目构建工具 ==》项目是否需要工作空间

  2. 生成API文件

    tri api -i<入口文件> ./src/router/routes.ts -o<输出位置> ./apis 

    | 参数名 | 参数缩写 | 可选参数 | 说明 | | -------- | -------- | ------------ | -------------------------------------------- | | mode | -m | alone|class | 生成Api的模型,默认 "object" | | input | -i | ---- | 生成Api的入口,默认 "./src/router/routes.ts" | | output | -o | ---- | 生成Api的输出,默认 "./apis/" | | template | -t | ---- | 生成Api的模版 ,默认 "" | | extname | -e | ---- | 生成Api的后缀,默认 ".ts" | | help | -h | ---- | 显示帮助 |

    输入命令后,根据页面路由,生成每个模块的接口文件,减少创建每个模块接口文件和内容的时间。只需要根据接口文档修改每个模块的接口path。

  3. 生成视图文件

    tri view -i<入口文件> ./src/router/routes.ts -o<输出位置> ./apis 

    | 参数名 | 参数缩写 | 可选参数 | 说明 | | ------------ | -------- | -------- | ------------------------------------------------ | | input | -i | ---- | 生成Vue视图的入口,默认 "./src/router/routes.ts" | | output | -o | ---- | 生成Vue视图的输出 ,默认 "./pages/" | | template | -t | ---- | 生成Vue视图的自定义模版 | | templateDate | -td | ---- | 生成Vue数据的自定义模版 | | help | -h | ---- | 显示帮助 |

    输入命令后,根据页面路由,生成每个模块的页面文件,减少创建每个模块页面和页面内容的时间。只需要根据原型/设计稿修改页面的内容

  4. 生成测试数据

    tri mock -i<入口文件> ./src/router/routes.ts -o<输出位置> ./mock 

    | 参数名 | 参数缩写 | 说明 | | -------- | -------- | ------------------------------------------------ | | input | -n | 生成Vue视图的入口,默认 "./src/router/routes.ts" | | output | -o | 存放路径 | | template | -t | 生成VueRouter的自定义模版 | | help | -h | 显示帮助 |

  5. 汇总路由配置

    tri menu -i<入口文件> ./src/router/routes.ts -o<输出位置> ./menu.js 

    | 参数名 | 参数缩写 | 说明 | | ------ | -------- | ------------------------------------------------ | | input | -n | 生成Vue视图的入口,默认 "./src/router/routes.ts" | | output | -o | 输出文件路径 | | help | -h | 显示帮助 |

  6. 生成单个路由

    tri router -n content

    | 参数名 | 参数缩写 | 说明 | | -------- | -------- | ---------------------------------------- | | name | -n | 生成VueRouter的路由名称 | | output | -o | 生成VueRouter的存放路径 | | extname | -e | 生成VueRouter的文件后缀 (default: ".ts") | | template | -t | 生成VueRouter的自定义模版 | | help | -h | 显示帮助 |

  7. 汇总项目代码

    tri coding -i<入口目录> ./src -o<输出文件> ./coding.txt 

    | 参数名 | 参数缩写 | 说明 | | ------ | -------- | ------------------------------- | | input | -i | 需要合并代码的目录,默认为"src" | | output | -o | 文件的存放位置 | | suffix | -s | 文件的后缀 | | help | -h | 显示帮助 |

  8. 生成菜单MYSQL

    tri mysql -i<入口文件> ./src/router/routes.ts -o<输出位置> ./apis 

    | | 参数缩写 | 可选参数 | 说明 | | ------ | -------- | -------- | ------------------------------------------ | | input | -i | ---- | 路由文件路径 | | output | -o | ---- | 输出文件路径 | | template | -t | ---- | 自定义模版 | | help | -h | ---- | 显示帮助 |

  9. 查看服务器文件

    tri list -i<入口文件> ./src/router/routes.ts -o<输出位置> ./apis 

    | 参数名 | 参数缩写 | 可选参数 | 说明 | | ------ | -------- | -------- | ------------------------------------------ | | remote | -r | ---- | 远程服务器路径名称 | | config | -c | ---- | 远程服务器配置文件 默认 "./web.release.js" | | help | -h | ---- | 显示帮助 |

  10. 上传文件到服务器

    tri upload -l<本地文件路径> ./admin -r<远程文件路径> ./public 

    | 参数名 | 参数缩写 | 可选参数 | 说明 | | ------ | -------- | -------- | ------------------------------------------ | | locate | -l | ---- | 指定删除路径名称 | | remote | -r | ---- | 远程服务器路径名称 | | config | -c | ---- | 远程服务器配置文件 默认 "./web.release.js" | | help | -h | ---- | 显示帮助 |

  11. 删除服务器文件

    tri remove -r<移除服务器文件> ./admin 

    | 参数名 | 参数缩写 | 可选参数 | 说明 | | ------ | -------- | -------- | ------------------------------------------ | | remote | -r | ---- | 远程服务器路径名称 | | config | -c | ---- | 远程服务器配置文件 默认 "./web.release.js" | | help | -h | ---- | 显示帮助 |

  12. 下载服务器文件

    tri download -l<存放位置> ./download -r<服务器文件> ./admin 

    | 参数名 | 参数缩写 | 可选参数 | 说明 | | ------ | -------- | -------- | ------------------------------------------ | | locate | -l | ---- | 指定下载到本地的路径 | | remote | -r | ---- | 要下载的远程服务器文件 | | config | -c | ---- | 远程服务器配置文件 默认 "./web.release.js" | | help | -h | ---- | 显示帮助 |