Skip to content

Commit

Permalink
v6.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Mar 14, 2024
1 parent e0233ec commit 356909c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
[#x]: https://github.com/ideditor/schema-builder/issues/x
-->

# 6.5.1
##### 2024-Mar-14

* Also include category icons in '/interim/icons.json'


# 6.5.0
##### 2024-Mar-14

Expand Down
5 changes: 3 additions & 2 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function processData(options, type) {
translationsForYaml[sourceLocale] = { presets: translations };
fs.writeFileSync(interimDir + '/source_strings.yaml', translationsToYAML(translationsForYaml));

let icons = generateIconsList(presets, fields);
let icons = generateIconsList(presets, fields, categories);
fs.writeFileSync(interimDir + '/icons.json', JSON.stringify(icons, null, 4));

if (type !== 'build-dist') return;
Expand Down Expand Up @@ -683,10 +683,11 @@ function generateTaginfo(presets, fields, deprecated, discarded, tstrings, proje
return taginfo;
}

function generateIconsList(presets, fields) {
function generateIconsList(presets, fields, categories) {
const icons = {};
[
...Object.values(presets).map(p => p.icon).filter(Boolean),
...Object.values(categories).map(c => c.icon).filter(Boolean),
...Object.values(fields).flatMap(f => Object.values(f.icons || {}))
].forEach(icon => icons[icon] = true)

Check failure on line 692 in lib/build.js

View workflow job for this annotation

GitHub Actions / build (18)

Missing semicolon
return Object.keys(icons).sort();
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "@ideditor/schema-builder",
"version": "7.0.0-dev",
"version": "6.5.1",
"description": "Framework for defining iD-compatible tagging models",
"homepage": "https://github.com/ideditor/schema-builder#readme",
"bugs": "https://github.com/ideditor/schema-builder/issues",
Expand Down

0 comments on commit 356909c

Please sign in to comment.