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 🙏

© 2025 – Pkg Stats / Ryan Hefner

hfex-check

v1.1.0

Published

自动化检测工具

Downloads

1

Readme

前端工程化——自动化检测工具

安装

全局安装或者局部安装


npm i hfex-check -g 

npm i hfex-check -D

目前主要有3个检测功能

检测husky是否安装

husky主要是提供一些git hooks,例如pre-commit,commit-msg,pre-push,所以确保安装的husky,并进行初始化

npx hfex-check --husky

如果检测到到根目录没有初始化git,会提示

截图示例

如果检测没有安装husky,会提示

截图示例

安装husky

npm i husky -D

再次执行,会检测是否已经husky install,如果没有,则会自动执行 npx husky install ,然后自动生成commit-msg

截图示例

commit-msg内容如下

截图示例

检测git commit提交信息规范(前提,必须初始化了husky和生成了commit-msg)

npx hfex-check --commit

在提交代码时,会检测提交的信息是否符合规范,不符合规范则不会提交成功

截图示例

使用的规范是commitlint-config-hfex,

https://github.com/UzumakiHan/commitlint-config-hfex

检测文件目录结构

npx hfex-check --directory
  1. 检测以由mfex-project生成的vue项目和react项目目录结构

  2. 检测资源文件的大小

 fileSizeLimit: {
        // 设置不同扩展名文件的大小限制, 单位为 kb
        default: 200,
        jpg: 400,
        png: 400,
        mp3: 400,
        gif: 400,
        svg: 400
    }
  1. 检测文件命名,命名规范是

kebab-case

lowercase

https://github.com/UzumakiHan/mfex-project

参数

| arg | 说明 |
| :-------: | :------: | | -v | 查看版本号 | | --husky | 检测husky | | --commit | 检测commit提交信息 | | --directory | 检测项目目录结构规范 |