Skip to content

brettburwell/svg-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVG Build

Standard SVG build process to handle icon, full, and inline SVGs.

Install

npm install @static-interactive/svg-build

Setup

This package expects the following directory structure:

  • src/svg/icon
    • Single-color icons that will have their color set to currentColor and are added to sprite sheet
  • src/svg/full
    • Multi-color icons that will not have their colors updated and are added to sprite sheet
  • src/svg/inline
    • Single or multi-color SVG that are intended to be included inline in your HTML

Use

npm run svg-build

This will optimize all SVG files in src/svg and copy them to the following locations:

  • templates/_svg/inline
    • Optimized files intended for inline use in your HTML.
  • templates/_svg/symbol
    • Optimized sprite sheet files intended for use with <use> in your HTML.
  • src/static/svg/
    • All files optimized. This will be copied to your final destination by Vite and are intended for use in CSS.

Release

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •