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

@dhlx/dhlx-cli

v0.3.12

Published

dhlx 脚本

Readme

dhlx-cli

一、简介

dhlx 命令行工具

二、安装

使用以下命令通过 NPM 安装:

npm install @dhlx/dhlx-cli

三、使用示例

Usage: dhlx [options] [command]

Options:
  -V, --version                output the version number
  -h, --help                   display help for command

Commands:
  create [template] [project]  创建项目
  process [options]            处理 Excel 文件
  compress [options]           Compress images
  image-size [options]         Change images size
  word-to-html [options]       Change word to html
  convert [options]            Convert image formats
  init <type>                  Copy a specific configuration file [prettier,tsconfig,jscpd,deploy,process] from the project to the current working directory
  deploy [options]             Compress specified directories and upload to server
  excel2json [options]         将 Excel 文件转换为 JSON 格式
  json2excel [options]         将  JSON 文件转换为 Excel 格式
  gh-pages [options]           部署git hub page 页面
  code-line [options]          统计代码行数
  help [command]               display help for command

四、参数

create

  • template: 创建项目类型 ["vite-lib", "ts-lib"]

  • project: 创建项目名称

复制配置文件

dhlx init prettier // 代码格式化配置
dhlx init tsconfig // 代码ts配置
dhlx init deploy // 代码部署配置
dhlx init process // xlsx对比配置

批量将word转换成html

dhlx word-to-html -i ./input -o ./output

批量将pdf 转换成 html

brew install poppler
dhlx pdf2html -i./input -o./output

部署github pages 页面, 将发布新的分支到 gh-pages分支

dhlx gh-pages -i dist

统计代码行数


dhlx code-line -e .report,node_modules,idea,.git,.github,.dist --detail

| 参数 | 简写 | 类型 | 默认值 | 描述 | |---------------------|------|------------|------------------------------------------------|-----------------| | --input | -i | <path> | ./ | 指定要扫描的目录 | | --excludes | -e | <string> | node_modules,.git,dist,build | 要排除的目录,使用逗号分隔 | | --extensions | -t | <string> | .js,.ts,.jsx,.tsx,.vue,.html,.css,.scss,.mjs | 要统计的文件扩展名,逗号分隔 | | --detail | -d | flag | - | 输出详细的配置信息(用于调试) | | --no-empty-line | - | flag | - | 排除空行统计 | | --no-comment-line | - | flag | - | 排除注释行统计 |

图片格式转换与压缩

deploy命令-文件ssh上传

process命令-excel数据处理

excel与json-相互转换

五、贡献

如果您发现任何问题或有改进的建议,欢迎提交 issue 或 pull request。

六、许可证

本项目遵循 MIT License