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

@vuonweb/icon-builder

v0.1.1

Published

CLI sinh icon component (React/React Native/Vue/Svelte) từ file SVG nguồn.

Readme

@vuonweb/icon-builder

CLI sinh icon component (React / React Native / Vue / Svelte) từ SVG nguồn, dùng để phát triển icon-builder.

Lưu ý quan trọng: CLI này được viết để chạy bên trong repo icon-builder — nó đọc SVG từ thư mục icons/ và ghi component đã generate vào các đường dẫn cố định (packages/react/src, packages/react-native/src, packages/vue/src, packages/svelte/src) tương đối theo thư mục đang đứng khi chạy lệnh (process.cwd()). Đây không phải công cụ generic để bạn trỏ vào bộ SVG tuỳ ý trong project riêng — nếu bạn chỉ muốn dùng icon có sẵn, hãy cài package tương ứng với framework của bạn thay vì package này:

Dùng để làm gì

Nếu bạn đang đóng góp icon mới cho repo icon-builder (clone repo, thêm SVG vào icons/outline/ hoặc icons/solid/), CLI này là bước generate ra component cho cả 4 framework.

Cài đặt (trong repo icon-builder)

CLI đã là một package trong workspace, không cần cài riêng — chạy qua script ở root:

pnpm icons:build   # đọc icons/, validate, optimize (SVGO), generate component cho cả 4 target
pnpm icons:watch   # theo dõi icons/ và tự rebuild khi thêm/sửa/xoá SVG
pnpm icons:clean   # xoá toàn bộ file generated (giữ lại Icon.tsx/.vue/.svelte viết tay)

Hoặc chạy trực tiếp qua npx nếu đã cài global/qua dlx (vẫn cần đứng ở thư mục gốc repo icon-builder đã clone, vì đường dẫn output là cố định):

npx @vuonweb/icon-builder build
npx @vuonweb/icon-builder watch
npx @vuonweb/icon-builder clean

Quy ước icon nguồn

  • SVG đặt tại icons/<style>/<name>.svg, style là outline hoặc solid.
  • Tên file dùng kebab-case (arrow-left.svg); sinh ra component tên PascalCase (ArrowLeft), thêm hậu tố theo style không phải outline (vd. arrow-left.svg trong icons/solid/ → ArrowLeftSolid).
  • SVG phải có viewBox, không chứa <script>; width/height/style cố định sẽ bị SVGO loại bỏ tự động ở bước optimize.

License

MIT