问题
Is it possible to add a custom console.log if my custom npm script throws an error? Or is it at all possible to add custom console.log to a script?
I have this entry in my scripts object of package.json:
"check": "npm list --depth=0 | grep"
And need a console.log specifically for this script.
来源:https://stackoverflow.com/questions/48006553/how-to-define-a-custom-console-log-if-a-script-in-package-json-throws-an-error