1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-02-17 11:54:41 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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"