From c57320d417e4fe2d724112d0811fae56e2e9866d Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 7 Apr 2022 11:24:30 +0300 Subject: Optimize `src/tags.json` --- src/tags.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tags.json b/src/tags.json index cab4e929..3fbfc7ad 100644 --- a/src/tags.json +++ b/src/tags.json @@ -3,7 +3,7 @@ { {% for icon in site.icons %} {% assign slug-tags = icon.slug | split: '-' %}{% assign tags = slug-tags | concat: icon.tags %} "{{ icon.slug }}": { "category": "{{ icon.category }}", - "tags": [{% for tag in tags %}"{{ tag }}"{% unless forloop.last %}, {% endunless %}{% endfor %}], + "tags": ["{{ tags | join: '", "' }}"], "version": "{{ icon.version }}" }{% unless forloop.last %}, {% endunless %}{% endfor %} } -- cgit v1.2.1 From 660de9000200bbd64ed23649c25302cdb55adb6c Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 7 Apr 2022 11:43:30 +0300 Subject: Add option `excludeOffIcons` in `gulpfile.js` --- gulpfile.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index a36fb97b..5cb1bf57 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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" -- cgit v1.2.1