RepositoryJavaScript
SV

svg-sprite/svg-sprite

SVG sprites & stacks galore — A low-level Node.js module that takes a bunch of SVG files, optimizes them and bakes them into SVG sprites of several types along with suitable stylesheet resources (e.g. CSS, Sass, LESS, Stylus, etc.)

2.0ksao
258fork
50issue
6lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: mustache

#1 Repository của tháng

1
TINIX TRENDING·Chủ đề: mustache

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: svgo

#1 Repository của tháng

🎯 svg-sprite: Biến thành bộ sprite SVG từ hàng loạt file nguồn

Một thư viện Node.js mạnh mẽ giúp tối ưu và gom nhiều file SVG thành các dạng sprite khác nhau, đồng thời sinh ra stylesheet tương thích tự động.

svg-sprite là một module Node.js dùng cho các ứng dụng xử lý SVG phức tạp. Thay vì tự viết logic để tối ưu và gộp SVG, thư viện này cung cấp toàn bộ quy trình: nhận file SVG → tối ưu bằng SVGO → tạo sprite theo nhiều dạng → sinh stylesheet phù hợp.

✨ Điểm nổi bật

  • Hỗ trợ nhiều kiểu sprite: CSS sprite (background), CSS sprite với <view>, inline sprite bằng <defs>, inline sprite bằng <symbol>, và SVG stacks.
  • Tích hợp SVGO: Tối ưu file SVG trước khi đóng gói để giảm kích thước.
  • Sinh stylesheet tự động: Hỗ trợ CSS, Sass, Less, Stylus thông qua template Mustache.
  • Template tùy chỉnh: Dễ dàng sửa template hoặc thêm định dạng đầu ra mới.
  • Hỗ trợ stream: Dựa trên Node.js streams, phù hợp xử lý bất đồng bộ lớn.
  • Tạo tài liệu HTML mẫu: Có thể kèm theo file HTML minh họa cách dùng sprite.
  • Có sẵn wrapper Grunt & Gulp: Không cần viết code đọng file, chỉ cần dùng plugin tương ứng.
  • Là nền tảng cho iconizr: Dùng để tạo bộ icon SVG với fallback PNG.

💡 Vì sao đáng chú ý

nDự án không chỉ là công cụ đóng gói SVG đơn thuần mà còn tích hợp toàn bộ pipeline từ tối ưu, tạo sprite đến sinh stylesheet. Điều này giúp giảm đáng kể công sức phát triển và đảm bảo tính nhất quán giữa các thành phần. Phù hợp với các dự án web hiện đại cần tối ưu tài nguyên SVG, đặc biệt khi làm việc với hệ thống icon lớn hoặc cần hỗ trợ nhiều định dạng biên tập CSS.


#SVG #Sprite #NodeJS #OpenSource #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryJavaScript
twbs/bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

175.1k
Dec 1, 2026
RepositoryC++
electron/electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

124.3k
Dec 2, 2026
RepositoryJavaScript
microsoft/Web-Dev-For-Beginners

24 Lessons, 12 Weeks, Get Started as a Web Developer

97.2k
Dec 1, 2026
Repository
florinpop17/app-ideas

A Collection of application ideas which can be used to improve your coding skills.

98.8k
Oct 11, 2025
RepositoryMDX
thedaviddias/Front-End-Checklist

🗂 The essential checklist for modern web development, for humans and AI agents

74.9k
Oct 31, 2026
RepositoryJavaScript
juliangarnier/anime

JavaScript animation engine

75.3k
Dec 1, 2026
RepositoryJavaScript
h5bp/html5-boilerplate

A professional front-end template for building fast, robust, and adaptable web apps or sites.

57.7k
Dec 2, 2026
RepositoryJavaScript
prettier/prettier

Prettier is an opinionated code formatter.

52.5k
Dec 2, 2026
RepositoryJavaScript
Asabeneh/30-Days-Of-JavaScript

30 days of JavaScript programming challenge is a step-by-step guide to learn JavaScript programming language in 30 days. This challenge may take more than 100 days, please just follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw

47.0k
Aug 27, 2026