Skip to content

Commit 4c7ad50

Browse files
committed
Silence warnings
1 parent 7ba321f commit 4c7ad50

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

scripts/check_icons.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function checkIcons() {
6666
console.time(END);
6767

6868
const iconIds = {};
69-
const iconIdParts = {};
69+
const iconIdPartsObj = {};
7070

7171
globSync(`./icons/**/*.svg`).forEach(file => {
7272
const contents = readFileSync(file, 'utf8');
@@ -86,8 +86,10 @@ function checkIcons() {
8686
process.exit(1);
8787
}
8888
iconIds[id] = true;
89-
const parts = id.split(/_with_|_on_|_in_|_onto_|_into_|_and_|_for_|_under_|_over_|_above_|_between_|_atop_|_within_|_toward_|_wearing_|_holding_|_carrying_|_beside_/);
90-
if (parts[0] !== id) parts.forEach(part => iconIdParts[part] = true);
89+
const parts = id.split(/_with_|_on_|_in_|_onto_|_into_|_and_|_under_|_over_|_above_|_beside_|_between_|_atop_|_within_|_from_|_to_|_toward_|_wearing_|_holding_|_carrying_|_crossing_|_dragging_|_aiming_|_boarding_|_riding_|_driving_|_using_/);
90+
// if (parts[0] !== id) {
91+
// parts.forEach(part => iconIdPartsObj[part] = true);
92+
// }
9193

9294
// Make xml declaration consistent
9395
xml.dec({ version: '1.0', encoding: 'UTF-8' });
@@ -226,12 +228,11 @@ function checkIcons() {
226228

227229
});
228230

229-
Object.keys(iconIdParts)
230-
.sort()
231-
.filter(part => !iconIds[part])
232-
.forEach(part => console.log(`Missing base icon "${part}"`));
233-
234-
console.log(`Missing ${Object.keys(iconIdParts).length} base icons total`);
231+
// const iconIdParts = Object.keys(iconIdPartsObj).sort();
232+
// iconIdParts
233+
// .filter(part => !iconIds[part])
234+
// .forEach(part => console.log(`Missing icon part "${part}"`));
235+
// console.log(`Missing base icons for ${iconIdParts.filter(part => !iconIds[part]).length} parts of ${iconIdParts.length} parts total`);
235236

236237
console.timeEnd(END);
237238
}

0 commit comments

Comments
 (0)