Coffeekraken Docblock to Markdown
This package gives you the ability to parse a file of any languages and return a markdown version of it.
Table of content
Install
npm install git+ssh://git@github.com:Coffeekraken/docblock-to-markdown.git --save-dev
Get Started
First, require the package in your javascript node file like so:
const docblockParserToMarkdown = require('docblock-to-markdown');
// parse files
docblockParserToMarkdown(config).filesToMarkdown('src/**/*.js');
// parse string
const markdown = docblockParserToMarkdown(config).stringToMarkdown(stringToParse);
Configuration
Here's the configuration available for this package
config = {
// destination folder in case of files transforming
destination : 'doc',
// Part of each files path to remove before saving to destination
removePath : '',
// coffeekraken-docblock-parser configuration object
docblockParser : {},
// coffeekraken-docblock-to-markdown configuration object
docblockJsonToMarkdown : {}
};
coffeekraken-docblock-parser : Docblock parser package coffeekraken-docblock-to-markdown : Docblock JSON to markdown package
CLI
You can process your files through an small CLI like so:
Transform files
coffeekraken-docblock-to-markdown -f 'js/**/*.js' -d doc
Arguments
- -f (--files) : Files to process (glob pattern)
- -s (--string) : String to process
- -d (--destination) : Destination folder in case of files transforming
- -c (--config) : Js config file to load
- --remove-path : Part of each files path to remove before saving to destination
Contribute
This is an open source project and will ever be! You are more that welcomed to contribute to his development and make it more awesome every day. To do so, you have several possibilities:
Who are Coffeekraken
We try to be some cool guys that build some cool tools to make our (and yours hopefully) every day life better.
More on who we are
License
The code is available under the MIT license. This mean that you can use, modify, or do whatever you want with it. This mean also that it is shipped to you for free, so don't be a hater and if you find some issues, etc... feel free to contribute instead of sharing your frustrations on social networks like an asshole...