How to suppress output when running npm scripts

后端 未结 5 503
日久生厌
日久生厌 2020-12-23 10:48

I have decided to experiment with npm scripts as a build tool and so far I like it. One issue I\'d like to solve is when running a script to run jshint when something doesn

5条回答
  •  滥情空心
    2020-12-23 11:23

    You can do this inside your script by removing the event listeners

    #!/usr/bin/env node
    
    process.removeAllListeners('warning');
    
    // Do your thang without triggering warnings
    

提交回复
热议问题