1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-20 04:42:05 +02:00

Added brackets and fixed ident

This commit is contained in:
tijmenvangulik
2021-04-11 08:42:30 +02:00
parent c0f30068c2
commit ad20982ece
2 changed files with 16 additions and 12 deletions

View File

@@ -27,22 +27,26 @@ let compileOptions = {
if (fs.existsSync('./compile-options.json')) { if (fs.existsSync('./compile-options.json')) {
try { try {
let tempOptions = require('./compile-options'); let tempOptions = require('./compile-options');
if (typeof tempOptions!="object") if (typeof tempOptions!="object") {
throw "Compile options file does not contain an json object"; throw "Compile options file does not contain an json object";
}
if (typeof tempOptions.includeIcons!="undefined") { if (typeof tempOptions.includeIcons!="undefined") {
if (!Array.isArray(tempOptions.includeIcons)) if (!Array.isArray(tempOptions.includeIcons)) {
throw "property inludeIcons is not an array"; throw "property inludeIcons is not an array";
}
compileOptions.includeIcons= tempOptions.includeIcons; compileOptions.includeIcons= tempOptions.includeIcons;
} }
if (typeof tempOptions.strokeWidth!="undefined") { if (typeof tempOptions.strokeWidth!="undefined") {
if (typeof tempOptions.strokeWidth!="string" && typeof tempOptions.strokeWidth!="number") if (typeof tempOptions.strokeWidth!="string" && typeof tempOptions.strokeWidth!="number") {
throw "property strokeWidth is not a string or number"; throw "property strokeWidth is not a string or number";
}
compileOptions.strokeWidth=tempOptions.strokeWidth.toString(); compileOptions.strokeWidth=tempOptions.strokeWidth.toString();
} }
if (typeof tempOptions.fontForge!="undefined") { if (typeof tempOptions.fontForge!="undefined") {
if (typeof tempOptions.fontForge!="string") if (typeof tempOptions.fontForge!="string") {
throw "property fontForge is not a string"; throw "property fontForge is not a string";
}
compileOptions.fontForge=tempOptions.fontForge; compileOptions.fontForge=tempOptions.fontForge;
} }
@@ -252,8 +256,9 @@ gulp.task('iconfont-svg-outline', function (cb) {
strokedSVG = strokedSVG strokedSVG = strokedSVG
.replace('width="24"', 'width="1000"') .replace('width="24"', 'width="1000"')
.replace('height="24"', 'height="1000"'); .replace('height="24"', 'height="1000"');
if (compileOptions.strokeWidth) if (compileOptions.strokeWidth) {
strokedSVG = strokedSVG.replace('stroke-width="2"', `stroke-width="${compileOptions.strokeWidth}"`); strokedSVG = strokedSVG.replace('stroke-width="2"', `stroke-width="${compileOptions.strokeWidth}"`);
}
await outlineStroke(strokedSVG, { await outlineStroke(strokedSVG, {
optCurve: false, optCurve: false,

View File

@@ -40,8 +40,7 @@
"optimize": "gulp optimize", "optimize": "gulp optimize",
"release": "release-it", "release": "release-it",
"build": "gulp build", "build": "gulp build",
"build-iconfont": "gulp build-iconfont", "build-iconfont": "gulp build-iconfont"
"copy":"cp -r -n -v -f ./iconfont/fonts/* ../WebErgometer/WebApp/html/font"
}, },
"description": "A set of free MIT-licensed high-quality SVG icons for you to use in your web projects.", "description": "A set of free MIT-licensed high-quality SVG icons for you to use in your web projects.",
"keywords": [ "keywords": [