Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

metalsmith-svg-sprite

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-svg-sprite

metalsmith-svg-sprite ===================== [npmjs.com/package/metalsmith-svg-sprite](https://www.npmjs.com/package/metalsmith-svg-sprite)

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

metalsmith-svg-sprite

npmjs.com/package/metalsmith-svg-sprite

A metalsmith plugin wrapping around the awesome svg-sprite module.

Usage

First install metalsmith-svg-sprite as a development dependancy.

npm install --save-dev gulp-svg-sprite

Then add it to your metalsmith.json:

{
  "plugins": {
    "metalsmith-svg-sprite": {
      "mode": {
        "symbol": true
      }
    }
  }
}

Options

You can also pass options to metalsmith-svg-sprite with the Javascript API or the CLI.

  • pattern: only files that match this pattern will be processed (default **/*.svg)
  • keepFiles: include the original svg files the files collection (default false)

pattern

Only files that match this pattern will be processed. So this metalsmith.json:

{
  "plugins": {
    "metalsmith-svg-sprite": {
      "pattern": "icons/*.svg",
      "mode": {
        "symbol": true
      }
    }
  }
}

Would only include SVG files in the icons directory.

keepFiles

If true, the original files will not be removed from the metalsmith files collection So this metalsmith.json:

{
  "plugins": {
    "metalsmith-svg-sprite": {
      "keepFiles": true,
      "mode": {
        "symbol": true
      }
    }
  }
}

Would keep the original SVG files - useful if the files are needed for other purposes.

svg-sprite

Any unrecognized options will be passed to svg-sprite. See the svg-sprite manual for more information.

License

CC0-1.0

FAQs

Package last updated on 14 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts