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 🙏

© 2026 – Pkg Stats / Ryan Hefner

purple-cli

v1.2.2

Published

purple poc cli

Readme

PURPLE-CLI

初衷

拿一个 vue 项目来说:

试想一下一个新的项目开始的时候需要做什么?

1. 使用 vue-cli 初始化一个新的项目。
2. 删除或更改 cli 帮你初始化的几个文件。
3. 搭建页面 layout,至少包括 header、aside、footer、main 四个组件,和一个容器。
4. axios 请求统一拦截,处理。
5. vue-router 导航守卫的构建。
6. 组件库的引用和配置,以及组件库通用组件的二次封装,例如:element-ui 的 message 组件。
7. 全局 sass 变量的配置,iconfont 引入,全局 css 样式的设置。
8. gitignore
9. hascky
10. eslint
11. vscode setting
12. loading `AND MORE . . .`

再想一下,新建一个页面需要做什么?

1. 新建一个 vue 文件,并写好生命周期。
2. 配置路由。
3. 配置导航菜单 `AND MORE . . .`

如果上面写的没有太多错误的话,构建一个新项目至少需要 3 人/日左右,除非你们团队有自己的模板。如果在一个现有的项目上改造也是不错的,但是 我最讨厌的就是改代码了!!!,不知道你是不是。

这个工具实现了三个场景:

- 构建新项目,比 vue-cli 和 react-cli 更加全面的涵盖上面所有的情况,你需要做的只是调用。
- 保存模板,你可以把自己的模板导入这个工具中,方便以后使用。
- 新建页面从未如此丝滑,一瞬间构建新页面,自动化加载。

安装

$ npm i -g purple-cli

命令:init - 初始化项目配置

```shell

$ purpleCli init

请填写项目名称:
请选择框架模板:
(*) vue-poc
( ) html-base

已更新配置! ./purple-cli.json
```

init 会在当前命令所在的路径,生成一个配置文件,当然也可以手动创建。

当前版本只有两个字段:

- title:项目名称 String
- frame: 框架模板标识 String

其他所有命令都是依据这个配置进行操作的。

命令:create - 创建项目

```shell

$ purpleCli create

创建项目中. . .
项目名称:new-new-new
框架模板:vue-poc

[结果] 创建成功!
[温馨提示] 项目初始化成功,请执行以下命令:

    cd new-new-new
    npm install
    npm run serve

访问项目,感谢您的使用!
```

create 会根据当前项目,结合 vue-poc 模板生成一个新的项目。

以后的版本可能会支持插件配置,当前版本还不支持。

命令: new - 新建页面 - 开发中 . . .

功能设计为 根据 page-key ,结合 page-module 生成一个页面,并同时生成 router、config、store 文件,自动化导入全局的对应配置中。即达到,new 完成即可访问的效果。

命令: add - 添加自定义模板 - 开发中 . . .

功能设计为向 purple-cli.json 中添加新的框架模板和页面模板,支持 git 地址、本地地址、npm 资源路径。

最后

目前维护在 gitee 上: https://gitee.com/purplechildren/purple-cli

欢迎 star,欢迎加入。