Skip to content

JoeTortuga/grunt-hjson

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-hjson

Build Status NPM version

Hjson plugin for grunt, converts from and to JSON.

Hjson, the Human JSON. A configuration file format that caters to humans and helps reduce the errors they make.

It supports #, // and /**/ style comments as well as avoiding trailing/missing comma and other mistakes. For details and syntax see hjson.org.

Usage

First, install grunt-hjson as a development dependency:

npm install --save-dev grunt-hjson

Then, add it to your gruntfile.js:

module.exports = function(grunt) {

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    hjson: {
      cvt: {
        files: [
          {
            expand: true,
            cwd: 'src/',
            src: ['*.hjson'],
            dest: 'dist/',
            ext: '.json',
          },
        ],
      }
    }
  });

  grunt.loadNpmTasks('grunt-hjson');

  grunt.registerTask('default', ['hjson']);
};

To convert to Hjson specify the .hjson extension in ext.

About

Hjson implementation for Grunt.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%