Error handling has to be reliable. The mentioned script should be such a reliable component, so let's remove any external dependencies so it won't break.
To achieve that, extract the output coloring of warnings and errors into an optional "formatter" callback that can be passed by the caller. In the calling script, chalk should be a non-optional dependency again.
Note: The manual output coloring is only necessary when executing NE scripts in the VS Task Runner Explorer. Everywhere else it works out of the box.
Error handling has to be reliable. The mentioned script should be such a reliable component, so let's remove any external dependencies so it won't break.
To achieve that, extract the output coloring of warnings and errors into an optional "formatter" callback that can be passed by the caller. In the calling script, chalk should be a non-optional dependency again.
Note: The manual output coloring is only necessary when executing NE scripts in the VS Task Runner Explorer. Everywhere else it works out of the box.
Jira issue