1.0.1 • Published 7 years ago

vue-svg-component-runtime v1.0.1

Weekly downloads
2,460
License
MIT
Repository
github
Last release
7 years ago

vue-svg-component-builder

This is a small utility library for creating directly-renderable VueJS components from SVG images. It is primarily designed to be used as a building block for other libraries which will handle the work of actually reading and parsing the SVGs into something usable by this library.

Installation

Simply run yarn add vue-svg-component-builder or npm install vue-svg-component-builder.

Usage

This library exports a single build function which takes in an SVG and returns a view component. Currently the only accepted format for the input is the AST output of vue-component-compiler

import { build } from 'vue-svg-component-builder'
import { compile } from 'vue-component-compiler'

let svg = fs.readFileSync('filename.svg').toString()
let compiled = compile(svg)

Vue.extend({
  components: {
    TestSvg: build(compiled.ast)
  }
})
web-studiomhhs-editormaterials-editorprocess-editorprocess-editor-proprocess-editor-singlevue-antd-pro-samplehuibur-antd-vue-pro@wf-core/corehs-ui-testfw_platformnbtd-demos-admin-uiant-vue-extendant-design-vue-extendlesscode-ui-componentslesscode-ui-upms@infinitebrahmanuniverse/nolb-vue-sv@everything-registry/sub-chunk-3093fx-antv-appwit-attitude-systemvue-jm-comvue-label-demoweiying-menuwen-iconvue-antd-pro-vuevue-antd-prolansen-vue-coreehr-npm-publishnewpwr-genoany-designerspang-webtwmw-ui1twmw-ui10twmw-ui11twmw-ui4twmw-ui6twmw-ui7twmw-ui8twmw-ui9tw-vue-pro1trs-vue-dynamic-formtrs-vue3-dynamic-formxn-admin-templatezhangjunming-test-b1@fishtank/icons-vue@neuqsoft/rbac-packagemuchaofengyallaludoparchisbaloot-clipackage-idcmproduct-sub-view-templateproduct-task-viewproduct-template-viewproduct-yun-sample-viewproduct-yun-task-viewproduct-yun-entrust-viewproduct-yun-quote-viewproduct-yun-report-viewproduct-yun-resource-viewneumedia-audio-player-mproduct-components-viewproduct-dataset-viewproduct-entrust-viewproduct-icons-viewproduct-main-viewproduct-custom-form-viewgruguy-adminhh-form-makinghan-report-viewer-codehanghan-formhc-form-makinginstitute-entrust-viewinstitute-report-viewinstitute-resource-viewinstitute-sample-viewinstitute-task-viewhx-vue-librarylinewell-workflow-common-frontendmanager-systemmagicship-cmslog-vue2x-antd-componentslabbol-basic-components@wf-core/components@xiange.li/formdesignadmin-frontend-starter-kitaepx_componetsauth-frontend-starer-kitant-huaxuao-feng-ant-design-prochs-vue-antd-prochs-antd-prochinaabs-common-componentsdaskclibasic-auth-web-componentsbetter-admin-ui-vue-exampledocument-automation-server-modulesecmax-adminfenqin-composableform-generator-mhfw_demo
1.0.1

7 years ago

1.0.0

7 years ago