browserify-inline-svg
A browserify plugin to inline svgs directly into your markup.
Last updated 10 years ago by busypixels .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install browserify-inline-svg 
SYNC missed versions from official npm registry.

Browerify Inline svg

A browserify plugin to inline svgs directly into your markup.

How?

Add the browserify plugin and pass in the basePath

var inlineSvg = require('browserify-inline-svg');

browserify( 'index.js' )
  .bundle()
  .pipe( inlineSvg({
    basePath: './target/www/app/'
  }))
  .pipe(process.stdout);

Add data-inline-svg to your image

<img data-inline-svg class="my-icon" src="assets/icons/my-icon.svg" />

This file will be inlined as full svg code

Current Tags

  • 1.0.2                                ...           latest (10 years ago)

3 Versions

  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE