Assemble middleware for generating a JSON file containing the context of each page. Basic middleware to help see what's happening in the build.
JavaScript HTML
Latest commit 15ff495 Sep 25, 2015 @doowb doowb updated related list
Permalink
Failed to load latest commit information.
docs
test
.gitattributes
.gitignore
.verb.md
Gruntfile.js
LICENSE-MIT
README.md
index.js
package.json

README.md

grunt-assemble-contextual NPM version

Generates a JSON file with the context of each page. Basic plugin to help see what's happening in the build.

Getting Started

In the command line, run:

npm install grunt-assemble-contextual --save

Next, to register the plugin with Assemble in your project's Gruntfile you can either specify the direct path to the plugin(s) (e.g. ./path/to/plugins/*.js), or if installed via npm, make sure the plugin is in the devDependencies of your project.js package.json, and simply add the module's name to the plugins option:

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    assemble: {
      options: {
        plugins: ['grunt-assemble-contextual', 'other/plugins/*.js'],
        contextual: {
          dest: 'tmp/'
        }
      },
      files: {
        'dist/': ['templates/*.hbs']
      }
    }
  });
  grunt.loadNpmTasks('assemble');
  grunt.registerTask('default', ['assemble']);
};

If everything was installed and configured correctly, after running grunt assemble you should see a JSON file for each page in the dest directory defined in the plugin's options. The basename of each page will be used as the name of each file.

This plugin will make the build run slower! To disable it simple remove it from the options or remove the dest property.

Visit the plugins docs for more info or for help getting started.

Options

dest

Type: String

Default: assemble.dest + /tmp

Destination of JSON context.

Other grunt-assemble plugins

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Authors

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on September 25, 2015.