0.0.3 • Published 6 years ago

svgud v0.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

svgud

Replaces a special tag in your vuejs template with your svg

Installation

$ npm install svgud

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.vue$/,
        loader: 'vue-loader',
      },
      {  // after vue-loader!
        test: /\.vue$/,
        loader: 'svgud',
        options: {
            path:  "./svg-folder"
        }
      }
    ]
  }
}

Usage

svg-folder/
├── my.svg
├── stars.svg
└── child-folder
    ├──my2.svg
    └──some.svg
webpack.config.js

Vuejs component

<template>
    <div>
        <svgud name="my" />
        <ul>
            <li><svgud name="star" /></li>
            <li><svgud name="child-folder/some" /></li>
        </ul>
    </div>
</template>

<script>
    export default {
        name: "myComponent"
    }
</script>
0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago