@coffeekraken/docblock-to-markdown
Parse and transform docblocks from your codebase into nice markdown files with ease.
Last updated 5 months ago by olivierbossel .
MIT · Original npm · Tarball · package.json
$ cnpm install @coffeekraken/docblock-to-markdown 
SYNC missed versions from official npm registry.

Coffeekraken docblock parser

npm npm npm

This package gives you the ability to parse a file of any languages and return a markdown version of it.

Table of content

  1. Install
  2. Get Started
  3. Configuration
  4. CLI

npm install @coffeekraken/docblock-to-markdown --save-dev

Get Started

First, require the package in your javascript node file like so:

const docblockParserToMarkdown = require("@coffeekraken/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-json-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

Coffeekraken

We are a young collective of front-end creative developers with one goal in mind. Build tools to make every team working day life better. This is our first and only concern. All our tools are build around that purpose. All what we provide are some cool tools that you can use the way you want. These tools features cover a large scope of the front-end workflow (styleguide generation, colors/fonts management, etc...). You can use only the parts that you need and let the rest aside...

Coffeekraken

Current Tags

  • 0.0.8                                ...           latest (5 months ago)

8 Versions

  • 0.0.8                                ...           5 months ago
  • 0.0.7                                ...           5 months ago
  • 0.0.6                                ...           5 months ago
  • 0.0.5                                ...           5 months ago
  • 0.0.4                                ...           6 months ago
  • 0.0.3                                ...           6 months ago
  • 0.0.2                                ...           6 months ago
  • 0.0.1                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 8
Last Day 0
Last Week 8
Last Month 0
Dependencies (7)
Dev Dependencies (11)

Copyright 2014 - 2016 © taobao.org |