Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

55 lines (41 sloc) 0.944 kb

The "directory_tree" task

The directory_tree task takes a list of files and generates a JSON file that resembles the directory tree represented by these files.

Overview

Run this task with the grunt directory_tree command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Options

options.base

Type: String
Default value: .

The path to your project.

Usage examples

One markdown file

grunt.initConfig( {
   directory_tree: {
      lib: {
         files: {
            'docs/api.md': [ 'lib/**/*.js' ]
         }
      }
   }
} );

Multiple markdown files

grunt.initConfig( {
   directory_tree: {
      lib: {
         files: {
            expand: true,
            cwd: 'lib',
            src: 'lib/**/*.js',
            dest: 'docs/api/',
            ext: '.md'
         }
      }
   }
} );
Jump to Line
Something went wrong with that request. Please try again.