How to add comments to package.json?

When you’re bored, you usually have your best ideas. While wasting some time on twitter this morning I met a legit question coming from @caludio (you should really follow him):

And I was a bit confused… It’s a JSON, I can do whatever I want with it! So I’ve put together some code just to run an npm install on it…

It works! It’s not the best possible solution, for sure no inline comments for example, but if you maintain the structure of your comments section very close to the one of package.json it will be definetely readable!

If you want to share a comment or report an issue with this post, please send me an email to napolux@gmail.com

Share on: Twitter, Facebook, Reddit, Hacker News or go back home.