Gulp Svgstore

screenshot of Gulp Svgstore

Combine svg files into one with symbol elements

Overview:

Gulp-svgstore is a tool that combines SVG files into one, using <symbol> elements. It sets the id attribute of the <symbol> element to the corresponding file name and generates the result filename based on the base directory of the first file. Additionally, it offers the option to output only <svg> element without <?xml ?> and DOCTYPE. This tool is helpful for managing and optimizing SVG files within web development projects.

Features:

  • Combines SVG Files: Merge multiple SVG files into one with <symbol> elements.
  • Automatic Options Setting: Automatically sets the id attribute and result filename based on file data.
  • Inlines SVG: Provides the option to output <svg> element without <?xml ?> and DOCTYPE.
  • Support for Minification: Can be used with gulp-svgmin to minify SVG files and ensure unique IDs.
  • HTML Integration: Offers guidance on how to inline the combined SVG into an HTML file.
gulp
Gulp

Gulp.js is an old but popular site building tool that automates various repetitive development tasks in web development, such as compiling Sass, minifying JavaScript, and optimizing images.