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

@ccpc/cad-viewer

v0.1.1

Published

CCPC Vue wrapper around @mlightcad/cad-viewer.

Readme

@ccpc/cad-viewer

@mlightcad/cad-viewer 的内部 Vue 封装。

该包对外只暴露一个组件 CcpcCadViewer,并将 mlightcad 的接入细节对宿主应用隐藏起来。

<script setup lang="ts">
import { CcpcCadViewer } from '@ccpc/cad-viewer'
</script>

<template>
  <CcpcCadViewer url="https://example.com/demo.dxf" />
</template>

为什么要有这个包

@mlightcad/cad-viewer 当前会带入一套 CAD 运行时栈,并且有自己的 three peer 版本。一些宿主应用已经依赖了其他版本的 three

这个封装会把 CAD 运行时一起打进库产物里,并且让 Vue 成为宿主侧唯一需要关心的 peer 依赖。

开发

npm install --legacy-peer-deps
npm run build

构建产物会输出到 dist/

在构建和打包之前,会先把 CAD worker 资源生成到 assets/

npm run prepare-assets

本地包测试

npm run pack:local

把生成的 tar 包安装到宿主应用中:

cd D:\work\modelcollab
npm install D:\new_work\ccpc-cad-viewer\ccpc-cad-viewer-0.1.0.tgz --legacy-peer-deps

示例

cd examples\vue-demo
npm install --legacy-peer-deps
npm run dev

示例项目通过 Vite 别名把 @ccpc/cad-viewer 解析到根目录的 src/index.ts,因此不会把这个包递归安装到它自己的 node_modules 里。

文档