D
D
dreamniker2016-10-17 23:35:00
gulp.js
dreamniker, 2016-10-17 23:35:00

How to parse SVG from multiple files and make a js object?

There are several svg files
test1.svg
test2.svg
and there is a parseSVG(svgString) function that turns the svg string into a js object (for further rendering on canvas)
and the parseSVG function must be executed for the contents of each svg file when the project is built, and the result is written to svgData .js like this:

svgData = {
test1: {...},
test2: {...}
}

can this be done? Or is the idea itself bad?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question