0.1.3 • Published 10 years ago

grunt-indexing v0.1.3

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

grunt-indexing

Create an index.html page with all files in a folder.

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-indexing --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-indexing');

The "indexing" task

Overview

In your project's Gruntfile, add a section named indexing to the data object passed into grunt.initConfig().

grunt.initConfig({
  indexing: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});

Options

options.layout

Type: String Default value:

A path to the file which holds your HTML layout you want to use as wrapper for the indexed content. Just make sure to put {{replace}} somewhere.

Usage Examples

Default Options

This example will find all *.html files, create a ul-li structure for them, then open the layout file, replace the placeholder and put the content into reference.html destination.

grunt.initConfig({
  indexing: {
    options: {
      layout : 'path/to/your/layout/file.html'
    },
    src: ['path/to/some/*.html'],
    dest : 'reference.html'
  },
});

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

(Nothing yet)

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago