https://github.com/hjson/grunt-hjson
Hjson plugin for Grunt.
https://github.com/hjson/grunt-hjson
grunt hjson
Last synced: 3 months ago
JSON representation
Hjson plugin for Grunt.
- Host: GitHub
- URL: https://github.com/hjson/grunt-hjson
- Owner: hjson
- License: mit
- Created: 2014-12-03T21:06:25.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-06-20T21:04:02.000Z (over 8 years ago)
- Last Synced: 2025-06-22T23:46:37.652Z (4 months ago)
- Topics: grunt, hjson
- Language: JavaScript
- Homepage: https://hjson.github.io/
- Size: 8.79 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grunt-hjson
[](http://travis-ci.org/hjson/grunt-hjson)
[](http://www.npmjs.com/package/grunt-hjson)Hjson plugin for grunt, converts from and to JSON.
[Hjson](http://hjson.org), the Human JSON. A configuration file format for humans. Relaxed syntax, fewer mistakes, more comments.
For details and syntax see [hjson.org](http://hjson.org).
## Usage
First, install `grunt-hjson` as a development dependency:
```shell
npm install --save-dev grunt-hjson
```Then, add it to your `gruntfile.js`:
```javascript
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`.