[NPM] Add comments to your npm scripts

The need for comments in your package.json file becomes desirable the more and more npm scripts you start to define. At first glance this might seem like a show stopper since JSON does not support comments, but there are ways around this limitation that we will discuss.

 

1. 

"//": "Run the script",
"start": "node index.js",

NPM will ignore "//".

 

2. 

"start": "# Run the script \n\t node index.js"

 

posted @ 2017-02-08 20:26  Zhentiw  阅读(153)  评论(0编辑  收藏  举报