How do I add comments to package.json for npm install?

后端 未结 20 1379
悲哀的现实
悲哀的现实 2020-12-07 07:30

I\'ve got a simple package.json file and I want to add a comment. Is there a way to do this, or are there any hacks to make this work?



        
20条回答
  •  心在旅途
    2020-12-07 07:51

    Here's my take on comments within package.json / bower.json:

    I have file package.json.js that contains a script that exports the actual package.json. Running the script overwrites the old package.json and tells me what changes it made, perfect to help you keep track of automatic changes npm made. That way I can even programmatically define what packages I want to use.

    The latest Grunt task is here: https://gist.github.com/MarZab/72fa6b85bc9e71de5991

提交回复
热议问题