Add optional input and output directory arguments to scripts/generate-icons.js
#1064
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add optional arguments to
scripts/generate-icons.js
to allow custom input/output dirs to be specified. This allows the script to be re-used to generate icons in other projects, or for other purposes. Per commit notes, I'm not using a proper CLI parser because the args are so simple. This can be changed if the syntax gets more complex.The initial use case is to generate icon components for the video player app. The changes in this PR are enough for that. It would be convenient if the script was included in the package, then we could add a
package.json
script to run it in the downstream project.While testing this I noticed that incremental runs of ESLint and Prettier were taking a long time because caching was not enabled, so I fixed that in a separate commit.