mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-14 13:58:21 +00:00
fix(scripts): Fix auto formatting script (#2712)
* Fix ./scripts/generateNextJSAliases.mjs * Fix generateChangeIconsMarkup scripts
This commit is contained in:
@@ -26,5 +26,8 @@
|
||||
"text",
|
||||
"layout",
|
||||
"math"
|
||||
],
|
||||
"aliases": [
|
||||
"grid-2-x-2-check"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -26,5 +26,8 @@
|
||||
"text",
|
||||
"layout",
|
||||
"math"
|
||||
],
|
||||
"aliases": [
|
||||
"grid-2-x-2-x"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ if (changedFilesPathString == null) {
|
||||
|
||||
const changedFiles = changedFilesPathString
|
||||
.split(' ')
|
||||
.map((file) => file.replace('.json', '.svg'))
|
||||
.filter((file) => file.includes('.svg'))
|
||||
.filter((file, idx, arr) => arr.indexOf(file) === idx);
|
||||
|
||||
if (changedFiles.length === 0) {
|
||||
|
||||
@@ -41,7 +41,8 @@ Promise.all(
|
||||
aliases.push(iconNameKebabCaseNextjsFlavour);
|
||||
}
|
||||
|
||||
const output = JSON.stringify({ ...iconMetaData, aliases }, null, 2);
|
||||
let output = JSON.stringify({ ...iconMetaData, aliases }, null, 2);
|
||||
output = `${output}\n`;
|
||||
fs.writeFile(path.resolve(ICONS_DIR, `${iconName}.json`), output, 'utf-8');
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user