Source Files

Ryan Harvey edited this page May 29, 2015 · 5 revisions

Source Files

A source file is one that will be modified by the grunt-file-blocks task. A file matching pattern, or array of patterns, may be configured for each Grunt task target.

Example Configuration

fileblocks: {
  target_one: {
    src: '*.html',
    dest: 'tmp/index.html',
    blocks: []
  target_two: {
    files: [
      { src: 'index.html', blocks: [] },
      { src: 'app/*.html', blocks: [] },
      { src: 'login.html', blocks: [] }

Configuration Properties


Type: String

A globbing pattern that identifies source files.

dest (optional)

Type: String

The full path to the destination file. If this property is omitted the task will modify the source file in place.


Type: Object[]

An array of block configuration objects.

options (optional)

Type: Object

A object that specifies any of the task options.