1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-30 09:10:59 +02:00

Add option excludeOffIcons in gulpfile.js

This commit is contained in:
Anton
2022-04-07 11:43:30 +03:00
committed by GitHub
parent 83b3588523
commit 660de90002

View File

@@ -54,7 +54,7 @@ if (fs.existsSync('./compile-options.json')) {
}
})
}
if (typeof tempOptions.excludeIcons !== "undefined") {
if (!Array.isArray(tempOptions.excludeIcons)) {
throw "property excludeIcons is not an array"
@@ -64,6 +64,13 @@ if (fs.existsSync('./compile-options.json')) {
})
}
if (typeof tempOptions.excludeOffIcons !== "undefined" && tempOptions.excludeOffIcons) {
// Exclude `*-off` icons
compileOptions.includeIcons = compileOptions.includeIcons.filter(function (icon) {
return !icon.endsWith('-off');
})
}
if (typeof tempOptions.strokeWidth !== "undefined") {
if (typeof tempOptions.strokeWidth !== "string" && typeof tempOptions.strokeWidth !== "number") {
throw "property strokeWidth is not a string or number"