@mdi/angular-material
Advanced tools
Comparing version 3.5.95 to 3.6.95
16
build.js
@@ -28,8 +28,10 @@ // Build mdi.svg | ||
function getNameWithPaths(files) { | ||
function getIconData(files) { | ||
// { name: "icon-name", path: "M..." } | ||
return files.map(file => { | ||
const name = file.match(/([^\/]+)\.svg$/)[1]; | ||
const path = fs.readFileSync(file, { encoding }).match(/ d="([^"]+)"/)[1]; | ||
return { name, path }; | ||
const svgContent = fs.readFileSync(file, { encoding }); | ||
const viewBox = svgContent.match(/ viewBox="([^"]+)"/)[1]; | ||
const path = svgContent.match(/ d="([^"]+)"/)[1]; | ||
return { name, viewBox, path }; | ||
}) | ||
@@ -45,5 +47,5 @@ } | ||
const files = getSvgFiles(); | ||
const icons = getNameWithPaths(files); | ||
const items = icons.map(({name, path}) => { | ||
return `<svg id="${name}"><path d="${path}"/></svg>` | ||
const icons = getIconData(files); | ||
const items = icons.map(({name, viewBox, path}) => { | ||
return `<svg id="${name}" viewBox="${viewBox}"><path d="${path}"/></svg>` | ||
}); | ||
@@ -55,2 +57,2 @@ const template = `<svg><defs>${items.join('')}</defs></svg>`; | ||
build(); | ||
build(); |
{ | ||
"name": "@mdi/angular-material", | ||
"version": "3.5.95", | ||
"version": "3.6.95", | ||
"description": "Distribution and Build for Angular Material MDI", | ||
@@ -26,5 +26,5 @@ "scripts": { | ||
"devDependencies": { | ||
"@mdi/svg": "^3.5.95", | ||
"@mdi/svg": "^3.6.95", | ||
"@mdi/util": "^0.3.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1423272
48