Code Monkey home page Code Monkey logo

dmd-readable's Introduction

Dmd Readable

A plugin for dmd and jsdoc-to-markdown to provide more readable docs

npm deps size vulnerabilities license


Installation

npm install dmd-readable


About

Pass the plug-in name to jsdoc2md or dmd:

jsdoc2md --plugin dmd-readable

This plugin (which was used to generate this readme) does a few things:

  • removes global indexes (see below)
  • places descriptions in block-quotes (Use @summary for descriptions without block quotes)
  • adds more whitespace before headings
  • changes the delimiter for multiple types in param tables to a comma
  • adds alias output

The removal of global indexes is now a setting in the template. If you are using your own template and you wish to retain this feature, add the following line to your template:

{{optionSet "global-index-format" "none"~}}

All options for global-index-format are "none", "grouped", "table", "dl". Other options and more info can be found here.

This plugin also provides the following helper functions:


package(key) ⇒ *

Reads info from the package.json file.

See: docs.hbs for an example of how to use this function

Param Type Description
key string The package property you want returned


changeCase(to, string) ⇒ string

Implements the library change-case.

See: docs.hbs for an example of how to use this function

Param Type Description
to string Shorthand or full name for the change-case function.
string string The string to modify


prefixLines(string, replacer) ⇒ string

Prefixes a string to the beginning of each line in the first string

Param Type Description
string string The string to modify
replacer string The string to prefix to each line


findBy(array, key, value) ⇒ array

Finds an object in an array with a matching key: value

Param Type Description
array array The array to search
key string The key to compare
value string The value to find


replace(string, pattern, newString) ⇒ string

Calls string.replace

Param Type Description
string string The string to modify
pattern string The first arg for string.replace
newString string The second arg for string.replace


isNew(string) ⇒ boolean

Determines if the provided string is truthy and is different than the string provided the previous time this function was called

Param Type
string string

dmd-readable's People

Contributors

darrenpaulwright avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.