grunt-dawg

Use dawg inside grunt to view or generate documentation

Usage no npm install needed!

<script type="module">
  import gruntDawg from 'https://cdn.skypack.dev/grunt-dawg';
</script>

README

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": {
            "source": "./docs",
            "output": "./build"
        }
    }
});

Any configuration option that dawg supports can be set through grunt. 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 on running dawg from grunt. By setting options in your grunt file these defaults can be changed to suit your project.

The above configuration is the same as running the following command from the project root:

$ dawg --source ./docs --output ./build

License

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