Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svgstore creates an unusable output file #11

Open
KenBallou opened this issue May 11, 2020 · 3 comments
Open

svgstore creates an unusable output file #11

KenBallou opened this issue May 11, 2020 · 3 comments

Comments

@KenBallou
Copy link

KenBallou commented May 11, 2020

svgstore-cli version: 1.3.1
OS: Debian Linux 10.4
Browser: Firefox 68.8.0esr

After $npm install svgstore-cli --save-dev, I use the following command line:

$npx svgstore -o flags.svg images/an.svg

Please see the file bug.txt for my HTML. (It is an HTML file, but github would not accept it with a .html extension.) Nothing is rendered. On the other hand, if I replace the svg tag with <image src="images/an.svg">, then the image is rendered.

I tried this same test using images/us.svg instead of images/an.svg (and changing <use href="flags.svg#an"> to <use href="flags.svg#us">) and got the expected result.

(Because github will not allow me to attach a .svg file, I have changed the extensions on the image files to .txt.)

an.svg
us.svg
bug.html

@KenBallou
Copy link
Author

Context: What I'm really trying to do is to take all the SVG files from the npm svg-country-flags package (in the svg directory) and combine them into one file.

For the an.svg file, I was able to make the svgstore output work by copying the xmlns:sodipodi and xmlns:inkscape namespace declarations from the svg element in an.svg to the svg element in flags.svg. However, this wasn't a complete solution for the entire set of combined flag images and in fact caused errors in the rendering of images.

(To be specific: the "entire set of combined flag images" is the output of the command:

$npx svgstore -o flags.svg node_modules/svg-country-flags/svg/*

In my original issue report, I have a symlink from images to node_modules/svg-country-flags/svg.)

@shannonmoeller
Copy link
Member

I'd rather not download attachments. Could you please provide a repo or gist with the svg and html files please?

@KenBallou
Copy link
Author

gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants