Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsdoc-to-markdown

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdoc-to-markdown - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

helpers/data/children.js

15

bin/cli.js

@@ -39,4 +39,7 @@ #!/usr/bin/env node

title: "jsdoc-to-markdown",
header: "Renders jsdoc documentation as markdown",
forms: [ "$ jsdoc2md <options> <source_files>" ]
header: "Markdown API documentation generator, good for Github projects",
forms: [
"$ jsdoc2md [<options>] <source_files>",
"$ cat doclets.json | jsdoc2md [<options>]"
]
});

@@ -56,3 +59,5 @@

if(argv.src){
jsdoc2md.render(argv.src, argv).pipe(process.stdout);
var renderStream = jsdoc2md.render(argv.src, argv);
renderStream.on("error", halt);
renderStream.pipe(process.stdout);
} else {

@@ -64,5 +69,5 @@ process.stdin.pipe(jsdoc2md.createRenderStream(argv)).pipe(process.stdout);

if (argv){
dope.red.error((argv.verbose ? err.stack : "") || "Error: " + err.message);
dope.red.error(argv.verbose ? err.stack : err.message);
} else {
dope.red.error("Error: " + err.message);
dope.red.error(err);
}

@@ -69,0 +74,0 @@ dope.error(usage);

@@ -101,3 +101,9 @@ "use strict";

return parse(options).pipe(createRenderStream(options));
var docStream = parse(options);
var renderStream = createRenderStream(options);
docStream.pipe(renderStream);
docStream.on("error", function(err){
renderStream.emit("error", err);
});
return renderStream;
}

@@ -104,0 +110,0 @@

{
"name": "jsdoc-to-markdown",
"author": "Lloyd Brookes",
"version": "0.4.0",
"version": "0.4.1",
"description": "Markdown API documentation generator, good for Github projects",

@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/jsdoc-to-markdown",

@@ -61,5 +61,6 @@ [![view on npm](http://img.shields.io/npm/v/jsdoc-to-markdown.svg)](https://www.npmjs.org/package/jsdoc-to-markdown)

##Usage
Document your source code using [correct jsdoc syntax](http://usejsdoc.org), then run it through `jsdoc2md`.
Document your source code using [correct jsdoc syntax](http://usejsdoc.org), then run it through `jsdoc2md`. If no `<source_files>` are supplied it will look for doclet data on `stdin`.
```
$ jsdoc2md <options> <source_files>
$ jsdoc2md [<options>] [<source_files>]
$ cat doclets.json | jsdoc2md [<options>]

@@ -78,8 +79,92 @@ -t, --template <string> A custom handlebars template to insert the rendered documentation into,

These projects have readme files rendered by `jsdoc2md`:
* https://github.com/75lb/handbrake-js (exports an object with inner class)
* https://github.com/75lb/array-tools (exports a object)
* https://github.com/75lb/file-set (exports a class)
* https://github.com/75lb/command-line-args (exports a class)
* [handbrake-js](https://github.com/75lb/handbrake-js) (exports an object with inner class)
* [array-tools](https://github.com/75lb/array-tools) (exports a object)
* [file-set](https://github.com/75lb/file-set) (exports a class)
* [command-line-args](https://github.com/75lb/command-line-args) (exports a class)
#API Reference
##Templating
Running `jsdoc2md` without a `--template` generates documentation with the default template, which looks like this:
{{>index}}
{{>modules}}
{{>globals}}
{{>others}}
###{{>index}}
Only output if there are at least two modules defined.
#Index
* Modules
* {{>module-name}}
* {{>member-names}}
* Global
* {{>global-name}}
###{{>modules}}
Outputs one {{>module}} partial per module.
###{{>globals}}
#Global
{{>global-index}}
{{>members}}
###{{>members}}
{{#each (members in=data)}}{{>member}}{{/each~}}
{{#each (functions in=data)}}{{>function}}{{/each~}}
{{#each (namespaces in=data)}}{{>namespace}}{{/each~}}
{{#each (constants in=data)}}{{>constant}}{{/each~}}
{{#each (typedefs in=data)}}{{>typedef}}{{/each~}}
{{#each (events in=data)}}{{>event}}{{/each~}}
{{#each (classes in=data)}}{{>class}}{{/each~}}
###{{>module}}
{{>module-head}}
{{>module-body}}
{{>module-exported}} (either a class with index, function or object with index)
###{{>module-head}}
{{>anchor}}
{{>heading}}{{>module-name}}
###{{>module-body}}
{{>fields}}
###{{>fields}}
{{>description~}}
{{>params~}}
{{>deprecated~}}
{{>augments~}}
{{>memberof~}}
{{>type~}}
{{>default~}}
{{>returns~}}
{{>access~}}
{{>enum~}}
{{>readOnly~}}
{{>since~}}
{{>version~}}
{{>authors~}}
{{>license~}}
{{>copyright~}}
{{>examples~}}
###{{>module-exported}}
{{>class}}, {{>function}} or {{>module-index}} and {{>members}}
###{{>class}}
{{>class-head}}
{{>class-body~}}
{{>class-members-index~}}
{{>class-members~}}
##API Reference
**Example**

@@ -86,0 +171,0 @@ ```js

@@ -87,2 +87,3 @@ #Index

* [doSomething(options)](#doSomething)
* [car](#car)
* [const: CONST_ONE](#CONST_ONE)

@@ -518,2 +519,3 @@ * [~~const: CONST_TWO~~](#CONST_TWO)

* [doSomething(options)](#doSomething)
* [car](#car)
* [const: CONST_ONE](#CONST_ONE)

@@ -743,2 +745,37 @@ * [~~const: CONST_TWO~~](#CONST_TWO)

<a name="car"></a>
##car
<a name="car#env"></a>
###car.env
decribes the current conditions
<a name="car#env.weather"></a>
####env.weather
what kind of day is it
**Type**: `string`
**Default**: `choppy`
<a name="car#env.roads"></a>
####env.roads
road condition
**Type**: `string`
**Default**: `wet`
<a name="car.wheels"></a>
###car.wheels
the round things
<a name="car.sensors"></a>
###car.sensors
the electronics that always go wrong
<a name="car.start"></a>
###car.start()
start the car
**Params**
- `string`
-
<a name="CONST_ONE"></a>

@@ -745,0 +782,0 @@ ##const: CONST_ONE

@@ -37,2 +37,3 @@ #Global

* [doSomething(options)](#doSomething)
* [car](#car)
* [const: CONST_ONE](#CONST_ONE)

@@ -262,2 +263,37 @@ * [~~const: CONST_TWO~~](#CONST_TWO)

<a name="car"></a>
##car
<a name="car#env"></a>
###car.env
decribes the current conditions
<a name="car#env.weather"></a>
####env.weather
what kind of day is it
**Type**: `string`
**Default**: `choppy`
<a name="car#env.roads"></a>
####env.roads
road condition
**Type**: `string`
**Default**: `wet`
<a name="car.wheels"></a>
###car.wheels
the round things
<a name="car.sensors"></a>
###car.sensors
the electronics that always go wrong
<a name="car.start"></a>
###car.start()
start the car
**Params**
- `string`
-
<a name="CONST_ONE"></a>

@@ -264,0 +300,0 @@ ##const: CONST_ONE

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc