a grunt-task for using marked-man to generate manpages from markdown
Made possible by the guys behind marked-man and grunt. Thanks!
This plugin requires Grunt.
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-markedman --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-markedman');
In your project's Gruntfile, add a section named markedman
to the data object passed into grunt.initConfig()
.
markedman: {
options: {
version: '<%= pkg.version %>',
section: '3'
},
readme: {
files: [
{src: 'README.md', dest: '<%= pkg.name %>.3' }
]
}
}
Type: String
Default value: ''
The version of your app.
Type: String
Default value: '1'
The man-section, see wikipedia. In general use (1) for commands and (8) for services.
Type: String
Default value: ''
The MANUAL string shown in the manpage header. See marked-man doku.
Type: String
Default value: 'readme.md'
Some markdown file to convert to man.
Type: String
Default value: 'dist/readme.1.man'
The destination of the generated manpage.
markedman: {
options: {
version: '<%= pkg.version %>',
section: '3'
},
readme: {
files: [
{src: 'README.md', dest: '<%= pkg.name %>.3' }
]
},
main: {
options: {
section: '1'
},
files: [
{src: 'doc/furtherDocs.md', dest: 'docA.1' },
{src: 'doc/plentyOfDocs.md', dest: 'docB.1' }
]
}
},
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.