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

@composy/vector-cli

v0.0.2

Published

Headless validation and build CLI for LDesign Vector assets

Readme

@composy/vector-cli

LDesign 矢量图形的无头 CLI 工具,提供项目创建、分析、校验、编译、构建、打包与解包命令。

安装

pnpm add @composy/vector-cli @composy/vector
npm install @composy/vector-cli

目录结构

src/
├── index.ts
└── project.js    # 项目命令实现

命令清单

| 命令 | 说明 | | -------------- | ---------------------------------------------- | | ldv create | 创建新矢量项目 | | ldv analyze | 打印特征计数、兼容性、资源依赖、诊断 | | ldv inspect | 检查文档结构 | | ldv validate | 校验文档(不安全 SVG、未解析引用、重复 id 等) | | ldv compile | 编译为 JSON/SVG/HTML/Web Component/Vue | | ldv build | 递归发现源集合并输出 | | ldv bundle | 打包为确定性 ZIP | | ldv unbundle | 解包 |

使用示例

# 编译单个文档
ldv compile path/to/name.vector dist/vector --target html,web-component,vue

# 构建目录
ldv build path/to/vectors dist/vectors

# 分析
ldv analyze path/to/name.vector

构建脚本 & 验证命令

pnpm build
pnpm type-check
pnpm run type-check:cjs
pnpm run lint:check
pnpm run test:run

产物说明

  • dist/ 提供浏览器入口与压缩产物;es/ 提供 ESM 发布入口;esm/ 提供独立 ESM 模块;lib/ 提供 CJS 模块和 bin/ldv.cjs 命令入口。各模块目录都带有对应 .d.ts 声明。
  • API 与命令入口分别由 .ldesign/builder.config.ts、.ldesign/bin.builder.config.ts 使用 @composy/builder 和 Rolldown 构建;类型检查配置集中在 .ldesign/tsconfig.*.json。

备注

  • validate、compile、build、bundle 共享 Core 的 Analyzer 发布门禁,遇到不安全 SVG 或无法解析的资源时返回非零退出码。
  • bundle 使用确定性 ZIP 元数据,便于与 Studio 浏览器包写入器交换。
  • 资产路径统一为项目相对 POSIX 路径;Windows 反斜杠会被规范化,路径穿越和规范化后的重复路径会被拒绝。