export-svg-typescript 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/export-svg-typescript.js +2 -2
- package/package.json +1 -1
package/export-svg-typescript.js
CHANGED
|
@@ -27,7 +27,7 @@ export function convertSVGFolderToExportIndex(inputFolder, indexPath) {
|
|
|
27
27
|
const baseName = path.basename(svgFile, ".svg");
|
|
28
28
|
|
|
29
29
|
// Read SVG content
|
|
30
|
-
|
|
30
|
+
let svgContent = fs.readFileSync(inputPath, "utf8");
|
|
31
31
|
|
|
32
32
|
// Extract original dimensions from SVG
|
|
33
33
|
const widthMatch = svgContent.match(/width="(\d+)"/);
|
|
@@ -35,7 +35,7 @@ export function convertSVGFolderToExportIndex(inputFolder, indexPath) {
|
|
|
35
35
|
const defaultWidth = widthMatch ? widthMatch[1] : "100";
|
|
36
36
|
const defaultHeight = heightMatch ? heightMatch[1] : "100";
|
|
37
37
|
|
|
38
|
-
if (!widthMatch
|
|
38
|
+
if (!widthMatch)
|
|
39
39
|
svgContent = svgContent.replace('<svg', '<svg width="100" height="100"')
|
|
40
40
|
// Convert SVG string to Base64
|
|
41
41
|
const svgBase64 = `data:image/svg+xml;base64,${btoa(
|