Konstantin Vulsonov dcbfe081c5 update pkg name
2018-09-19 01:05:59 +03:00
2018-09-19 00:34:26 +03:00
2018-09-19 00:55:25 +03:00
2018-09-19 01:00:32 +03:00
2018-09-19 01:05:59 +03:00
2018-09-19 01:05:59 +03:00
2018-09-18 23:25:34 +03:00

svg-iconset-builder

Plugin to create iconsets from SVG files

Disclaimer:
This plugin was created to prepare iconsets for Angular Material Icons
The кesult file will be a set of svg's with unique ids as a filename

Installation

Support command line interface:

npm install svg-iconset-builder -g

Or you can install for yout project

npm install svg-iconset-builder --save

Usage

Command line

svg-iconset --source=<source_folder|required> --name=<output_filename|required> --attrs=<comma separated attributes> --removeViewBox=<boolean>

Examples:

svg-iconset --source=assets/images/icons --name=icons

Creates file icons-iconset.svg in same folder

In Project


const SvgIconset = require('svg-iconset');

const config = {
  source: 'assets/images/icons', // Reqired
  result: 'icons', // Required
  // This is optional for optimisations
  optimize: {
    attrs: 'width, height, fill, stroke', // Will remove attributes
    removeViewBox: true, // Will remove attribute viewBox (default true)
  }
}

new SvgIconset(config).createSet();

Description
Plugin to create iconsets from SVG files
Readme 75 KiB
Languages
TypeScript 83%
JavaScript 17%