1.0.1 • Published 9 years ago

node-svg-inliner v1.0.1

Weekly downloads
2
License
GPL 2.0
Repository
github
Last release
9 years ago

node-svg-inliner

Build Status

This inliner is used by me in several projects to inline SVG's in HTML (it prevents stutter and decreases the amount of requests!). It can also be used to clean SVG's.

Usage

var inliner = require("node-svg-inliner")(options);
var parsedsvg = inliner("path/to/a/svg/file");

Options

  • baseDirectory (default __dirname): the directory from which the inliner works relative to
  • allowedTags (default ["p", "svg", "g", "path", "polygon", "rect"]): the allowed SVG tags the inliner outputs
  • allowedAttributes (default ["id", "fill", "points", "class", "d", "viewBox", "width", "height", "x", "y", "style", "transform"]): the allowed SVG attributes the inliner outputs
  • cache (default true): allow the inliner to cache processed SVG's in memory until the files change
  • removeNewLines (default false): set if the SVG should come out with no newlines and as little whitespace as possible
1.0.1

9 years ago

1.0.0

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago