1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-31 17:42:15 +02:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
codecalm
2022-04-11 22:57:14 +02:00
2 changed files with 9 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ if (fs.existsSync('./compile-options.json')) {
} }
}) })
} }
if (typeof tempOptions.excludeIcons !== "undefined") { if (typeof tempOptions.excludeIcons !== "undefined") {
if (!Array.isArray(tempOptions.excludeIcons)) { if (!Array.isArray(tempOptions.excludeIcons)) {
throw "property excludeIcons is not an array" 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 !== "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"

View File

@@ -3,7 +3,7 @@
{ {% for icon in site.icons %} { {% for icon in site.icons %}
{% assign slug-tags = icon.slug | split: '-' %}{% assign tags = slug-tags | concat: icon.tags %} "{{ icon.slug }}": { {% assign slug-tags = icon.slug | split: '-' %}{% assign tags = slug-tags | concat: icon.tags %} "{{ icon.slug }}": {
"category": "{{ icon.category }}", "category": "{{ icon.category }}",
"tags": [{% for tag in tags %}"{{ tag }}"{% unless forloop.last %}, {% endunless %}{% endfor %}], "tags": ["{{ tags | join: '", "' }}"],
"version": "{{ icon.version }}" "version": "{{ icon.version }}"
}{% unless forloop.last %}, {% endunless %}{% endfor %} }{% unless forloop.last %}, {% endunless %}{% endfor %}
} }