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

@ranchuanjiang/ms-cli

v0.0.1

Published

React 前端团队一体式脚手架工具

Readme

@msxf/ms-cli - 前端构建脚手架

效能研发团队自用 cli 工具,如在使用中遇到问题或有希望添加的新功能,欢迎积极反馈。

安装

使用马上消费镜像安装 npm

  npm install -g @msxf/ms-cli

1、项目创建

cloud-cli create myapp

? 请选择开发脚手架: react
✔ 获取模板数据...
? 请选择模板 cloud-ecs-admin-frontend
✔ 获取版本信息...
? 请选择对应版本 dev-cicd
? 请输入项目名称(例: audit) ecs-admin
? 请输入项目简介: (例: 审计前管项目) ecs后管项目
✔ waiting download template

Successfully created project myapp

2、项目启动

cloud-cli dev

3、项目构建

cloud-cli build

4、lint 检查

  • 含 eslint、stylelint 检查
cloud-cli lint


$ cloud-cli lint
info  - msResourceFreight

src/global.less
 30:3   ✖  Expected whitespace after "/*"    comment-whitespace-inside
 30:14  ✖  Expected whitespace before "*/"   comment-whitespace-inside

 E:\代码\msxf\gc-backend-bfe\src\utils\sentryInit\index.ts
  112:17  warning  'dsns' is assigned a value but never used  @typescript-eslint/no-unused-vars
  112:23  warning  'dsn' is assigned a value but never used   @typescript-eslint/no-unused-vars

5、代码查重

  • --threshold 允许通过的重复率
cloud-cli jscpd --threshold 10

┌────────────┬────────────────┬─────────────┬──────────────┬──────────────┬──────────────────┬───────────────────┐
│ Format     │ Files analyzed │ Total lines │ Total tokens │ Clones found │ Duplicated lines │ Duplicated tokens │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ javascript │ 19             │ 706         │ 6221         │ 0            │ 0 (0%)           │ 0 (0%)            │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ tsx        │ 25             │ 1994        │ 17006        │ 7            │ 109 (5.47%)      │ 966 (5.68%)       │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ less       │ 7              │ 651         │ 3619         │ 0            │ 0 (0%)           │ 0 (0%)            │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ typescript │ 30             │ 1049        │ 7715         │ 1            │ 6 (0.57%)        │ 85 (1.1%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ Total:     │ 81             │ 4400        │ 34561        │ 8            │ 115 (2.61%)      │ 1051 (3.04%)      │
└────────────┴────────────────┴─────────────┴──────────────┴──────────────┴──────────────────┴───────────────────┘
Found 8 clones.

7、组件命名校验

yarn check-naming

yarn run v1.22.19
$ cloud-cli check-naming
info  - 开始文件命名检查
error - File name -- components 下的文件 confirm.tsx !UpperCamelCase: E:\代码\msxf\gc-backend-bfe\src\layouts\components\AuthModal\confirm.tsx
error - File name -- components 下的文件 action.tsx !UpperCamelCase: E:\代码\msxf\gc-backend-bfe\src\layouts\components\Header\action.tsx
done - 文件命名检查已完成

8、项目测试

  • 支持快照
$ cloud-cli test
info  - msResourceFreight
info  - generate files
info  - Preparing...
 PASS  src/utils/__test__/index.test.tsx (52.427 s)
  getRouteItem
    √ should return null when no matching route is found (5 ms)
    √ should find a nested route (2 ms)
    √ should find a route with a hidden property (1 ms)

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        54.834 s

9、快速强制清空项目依赖,重新安装

cloud-cli clean

10、未使用文件检测

cloud-cli deadcode