Socket
Book a DemoInstallSign in
Socket

grunt-markdox

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-markdox

A grunt task for running markdox.

latest
Source
npmnpm
Version
1.2.1
Version published
Weekly downloads
184
-3.16%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-markdox

A grunt task for running markdox.

Getting Started

This plugin requires Grunt ~0.4.1

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-markdox --save-dev

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

grunt.loadNpmTasks('grunt-markdox');

The "markdox" task

Overview

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

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

Options

Type: String or Array Default value: {}

options.output

Type: String or Array Default value: undefined

The path of the file to write the generated documentation into.

options.formatter

Type: Function Default value: undefined

A formatting function that takes a docFile and returns it.

options.compiler

Type: Function Default value: undefined

A function that takes a filepath and data and returns the compiled data.

options.template

Type: String Default value: undefined

The template's filepath.

src

Type: String or Array Default value: undefined

A string pattern that represents a file or group of files or an array file names.

dest (shortcut to options.output)

Type: String or Array Default value: undefined

The path of the file to write the generated documentation into.

Usage Examples

Default Options

grunt.initConfig({
    markdox: {
        target: {
            files: [
                {src: 'src/file1.js', dest: 'docs/file1.md'}
                {src: 'src/file2.js', dest: 'docs/file2.md'}
            ]
        }
    },
})

Custom Options

grunt.initConfig({
    markdox: {
        options: {
            formatter: function (docfile) {
                return docfile;
            },
            compiler: function(filepath, data){
                return myCustomCompiler(data);
            },
            template: 'output.ejs'
        },
        target: {
            files: [
                {src: 'src/file1.js', dest: 'docs/file1.md'}
                {src: 'src/file2.js', dest: 'docs/file2.md'}
            ]
        }
    },
})

Keywords

dox

FAQs

Package last updated on 10 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.