Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    projmate-grunt-consolidatepublic

    projmate-grunt-consolidate

    Compiles templates using consolidate into HTML.

    Getting Started

    If you haven't used grunt before, be sure to check out the Getting Started guide.

    To install this plugin

    npm install projmate-grunt-consolidate --save-dev
     

    You must also install any engine library, for example to use the dust engine

    npm install dustjs-linkedin --save-dev

    Tasks

    This plugin registers all consolidate engines as grunt tasks.

    Run any engine like so grunt ENGINE.

    Files and options should be specified according to the multi task documentation.

    Version 0.4.x of this plugin is compatible with Grunt 0.4.x.

    Usage Examples

    Compile all dust files in src/ to generated/ using relative paths, excluding files and directories that start with underscore character.

    grunt.initConfig({
      dust: {
        // Consolidate engine options
        options: {
          views: __dirname + 'test/fixtures',
        },
     
        compile: {
          files: [{
            expand: true,
            cwd: 'src/',
            src: ['**/*.dust'],
            dest: 'generated/',
            ext: '.html',
     
            // ignore underscored directories or files
            filter: function(srcFile) {
              return !/\/_/.test(srcFile);
            }
          }],
     
          // locals
          options: {
            data: {
              title: 'My Front Page'
            }
          }
        }
      }
    });
     

    Release History

    Keywords

    none

    install

    npm i projmate-grunt-consolidate

    Downloadsweekly downloads

    1

    version

    0.4.0-pre

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar