0.1.2 • Published 12 years ago

grunt-html2json v0.1.2

Weekly downloads
1
License
-
Repository
github
Last release
12 years ago

grunt-html2json

Compile the html files into a JSON file.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-html2json

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-html2json');

Documentation

Example Code

grunt.initConfig({
  html2json: {
    dist: {
       src: ['src/*.txt', 'src/*.html'],
       dest: 'dist/built.json'
    }
  }
});

You might also want to trigger the compiled process by watching the file change. Append following ine in the grunt.initConfig list.

watch: {
  files: '<config:html2json.dist.src>',
  tasks: 'default'
}

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

  • 0.1 ++ Well, it works (testcase is yet to be done). ++ JSON is pretty print by default. Later will add an option to switch.

License

Copyright (c) 2012 Tom Tang
Licensed under the MIT license.

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago