grunt-hbs

Handlebars Generator for Grunt

npm install grunt-hbs
12 downloads in the last week
29 downloads in the last month

grunt-hbs

grunt handlebars html generator plugin

Getting Started

In Gruntfile.js:

grunt.initConfig({

...

    hbs:{
        preview: {
          src: ['html/**/*.html',
                'html/**/*.hbt',
                'html/**/*.json'],
          dest: '<%= preview %>/www',
          cwd: '<%= webroot %>/frag',
          rules: [
                  {url: "html/*.html" , layout: "html/layout.hbt"},
                  {url: "html/foo/**/*.html" , layout: "html/foo/foo_layout.hbt"},
                  {url: "html/foo/**/*.json" , layout: "html/foo/data_post.hbt"}
                  ]
        }
    }

...
});

grunt.loadNpmTasks('grunt-hbs');

run:

grunt hbs

Options

src

doc root where contains template layout file(hbt) and html, json files

dest

desitinaiton root where html files to be generated

Release History

  • 2013-08-28 v0.1.5 updated: cwd relative path rule changed.
  • 2013-08-26 v0.1.4 updated: html single src file can be generated by watch task
  • 2013-08-24 v0.1.3 updated: json file parse. file extension substring bug fix
  • 2013-08-23 v0.1.1 first release

Task submitted by [June Park]

npm loves you