-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak check-icons.js #1660
Tweak check-icons.js #1660
Conversation
* return early * use `path.basename` and `path.extname`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I like the early return statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could pull the process.exit()
out of the if-statements, so it doesn't stop after only showing the wrong icons in the JSON file. Theoretically you could also replace it with a throw
statement, like in my original PR, but I don't see the advantages to logging an additional error after already showing the wrong icons.
You might be right there, it maybe make more to just exit at the end once with
Yeah, that didn't work, unfortunately that's why I removed it. If you make any progress feel free to PR, thanks! :) |
path.basename
and path.extname
* replace require
with fs.readFile
* move variablesTweak check-icons.js
path.basename
and path.extname
* replace require
with fs.readFile
* move variablesTweak check-icons.js
I replaced |
path.basename
andpath.extname
require
withfs.readFile
@korki43 could you check this one too please? https://github.com/twbs/icons/pull/1660/files?w=1