We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2f7a09 commit d30698cCopy full SHA for d30698c
comment-markup.md
scripts/generateChangedIconsCommentMarkup.mjs
@@ -15,11 +15,21 @@ const BASE_URL = 'https://lucide.dev/api/gh-icon';
15
16
const changedFilesPathString = process.env.CHANGED_FILES;
17
18
+if (changedFilesPathString == null) {
19
+ console.error('CHANGED_FILES env variable is not set');
20
+ process.exit(1);
21
+}
22
+
23
const changedFiles = changedFilesPathString
24
.split(' ')
25
.map((file) => file.replace('.json', '.svg'))
26
.filter((file, idx, arr) => arr.indexOf(file) === idx);
27
28
+if (changedFiles.length === 0) {
29
+ console.log('No changed icons found');
30
+ process.exit(0);
31
32
33
const getImageTagsByFiles = (files, getBaseUrl, width) =>
34
files.map((file) => {
35
const svgContent = fs.readFileSync(path.join(process.cwd(), file), 'utf-8');
0 commit comments