1.1.0 • Published 4 years ago
@central-design-system/svg-builder v1.1.0
Central Design System - Svg Builder
Optimizing and compiling svg to vue.js component
Installation
Install with npm:
npm install @central-design-system/svg-builder --save-devInstall with yarn:
yarn add @central-design-system/svg-builder --devConfiguration
import SvgBuilder from '@central-design-system/svg-builder';
const svgBuilder = new SvgBuilder(entryDir, outputDir, options);
svgBuilder.build();entryDir
Type: String
Required: true
Path for your source svg files
outputDir
Type: String
Required: true
Path to output optimized and compiled vue files
options
Type: Object
Required: false
Default: {}
Options
| Name | Description | Type | Default |
|---|---|---|---|
| entityName | Name entity for optimization | String | svg |
| className | Main css class for svg tag | String | undefined |
| template | Vue-component template | String | defaultTemplate |
| createIndexFile | Create index file with install function for Vue.use() | Boolean | false |
| width | Default svg width | number | null |
| height | Default svg height | number | null |
| svgo | Svgo Options | SvgoOptions | {} |
| svgoPlugins | Svgo Plugin Options | Plugin[] | [] |