ckeditor5
ckeditor5 copied to clipboard
Improve `shExec` function implementation in `ckeditor5-dev`.
📝 Provide a description of the improvement
Improve shExec
implementation in ckeditor5-dev
: https://github.com/ckeditor/ckeditor5-dev/blob/master/packages/ckeditor5-dev-utils/lib/tools.js#L25
This function is used to execute sh commands in ckeditor5 ecosystem. Right now it has ~50 lines of code, and after adding async support, it would reach ~80 lines. With the current complexity, it's hard to modify and it's easy to introduce unexpected bugs.
Task description
- Simplify the
shExec
function implementation. - When refactoring the function, make sure that the behaviour stays the same.
[Bonus]
Consider splitting the sync and async versions into two separate functions, following the node tools convention: exec
and execSync
.
📃 Other details
- Browser: …
- OS: …
- CKEditor version: …
- Installed CKEditor plugins: …
If you'd like to see this improvement implemented, add a 👍 reaction to this post.