grunt-dawg

Use dawg inside grunt to view or generate documentation

npm install grunt-dawg
6 downloads in the last week
12 downloads in the last month

grunt-dawg

Use dawg inside grunt to view or convert markdown documentation for your project.

Installation

Install this grunt plugin next to your project's gruntfile with:

npm install grunt-dawg

Configuration

To load the dawg task add this line to your project's gruntfile:

grunt.loadNpmTasks('grunt-dawg');

The dawg grunt plugin can be configured by adding a dawg section to grunt.initConfig and adding a target to that section. The following configuration example adds a dawg:build task:target to grunt instructing dawg to convert files from ./docs to ./build:

grunt.initConfig({
    "dawg": {
        "build": {
            "options": {
                "source": "./docs",
                "output": "./build"
            }
        }
    }
});

The above task can be executed by running grunt dawg:build and is equivalent to dawg --source ./docs --output ./build.

Multiple targets are supported and the dawg section can be expanded with general options for all targets:

grunt.initConfig({
    "dawg": {
        "options": {
            "source": "./docs"
        },
        "build": {
            "options": {
                "output": "./build"
            }
        },
        "serve": {
            "options": {
                "watch": true,
                "port":  "5678",
                "host":  "localhost"
            }
        }
    }
});

Any configuration option that dawg supports can be set through grunt.initConfig. See dawgs documentation on configuration files in the dawg repository for all options and how to set them.

Just like the dawg cli the same defaults also apply when running dawg from grunt. By setting options in your grunt file these defaults can be changed to suit your project.

License

grunt-dawg is available under the MIT license. See the LICENSE file for more details.

npm loves you