grunt-strip-json-comments

Strip comments from JSON. Lets you use comments in your JSON files!

grunt-strip-json-comments

Strip comments from JSON. Lets you use comments in your JSON files!

Using the strip-json-comments module.

This is now possible:

{
    // rainbows 
    "unicorn": /* ❤ */ "cake"
}
$ npm install --save-dev grunt-strip-json-comments
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks 
 
grunt.initConfig({
    stripJsonComments: {
        dist: {
            files: {
                'without.json': 'with-comments.json'
            }
        }
    }
});
 
grunt.registerTask('default', ['stripJsonComments']);

MIT © Sindre Sorhus