Socket
Socket
Sign inDemoInstall

jsdoc-to-markdown

Package Overview
Dependencies
Maintainers
1
Versions
129
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.0.1 to 0.1.0

helpers/instantiate.js

21

bin/cli.js
#!/usr/bin/env node
"use strict";
var Model = require("nature").Model,
var cliArgs = require("command-line-args"),
cp = require("child_process"),

@@ -9,13 +9,18 @@ path = require("path"),

boil = require("boil-js"),
mfs = require("more-fs");
mfs = require("more-fs"),
dope = require("console-dope");
require("../")(boil);
require("handlebars-array")(boil);
var argv = new Model()
.define({ name: "template", alias: "t", type: "string" })
.define({ name: "json", alias: "j", type: "boolean" })
.define({ name: "src", type: Array, defaultOption: true })
.set(process.argv);
var argv = cliArgs([
{ name: "template", alias: "t", type: String },
{ name: "json", alias: "j", type: Boolean },
{ name: "src", type: Array, defaultOption: true },
]).parse();
if (!argv.src){
dope.red.error("specify at least one source file");
process.exit(1);
}
var templatePath = path.resolve(__dirname, "..", "jsdoc-template"),

@@ -22,0 +27,0 @@ cmd = util.format("jsdoc -t %s %s", templatePath, argv.src.join(" "));

var w = require("wodge");
module.exports = function(handlebars){
handlebars.registerHelper("paramList", function(params){
return w.arrayify(params).map(function(param){
return param.optional ? "[" + param.name + "]" : param.name;
}).join(", ");
handlebars.registerHelper("instantiate", function(input){
return input.charAt(0).toLowerCase() + input.slice(1);
});
};

@@ -1,2 +0,3 @@

var util = require("util");
var util = require("util"),
w = require("wodge");

@@ -12,16 +13,5 @@ /**

var json = data({ undocumented: { "!is": true }}).map(function(record){
var output = {};
if (record.description) output.description = record.description;
if (record.name) output.name = record.name;
if (record.kind) output.kind = record.kind;
if (record.classdesc) output.classdesc = record.classdesc;
if (record.augments) output.augments = record.augments;
if (record.memberof) output.memberof = record.memberof;
if (record.scope) output.scope = record.scope;
if (record.params) output.params = record.params;
if (record.returns) output.returns = record.returns;
if (record.examples) output.examples = record.examples;
return output;
return w.without(record, [ "comment", "meta", "undocumented", "___id", "___s" ]);
});
console.log(JSON.stringify(json, null, " "));
};
{
"name": "jsdoc-to-markdown",
"author": "Lloyd Brookes",
"version": "0.0.1",
"version": "0.1.0",
"description": "Render JSdoc documentation as markdown",

@@ -21,9 +21,8 @@ "repository": "https://github.com/75lb/jsdoc-to-markdown",

"dependencies": {
"boil-js": "~0.0.0",
"boil-js": "^0.1.0",
"command-line-args": "^0.2.0",
"console-dope": "^0.3.3",
"more-fs": "^0.3.0",
"nature": "~0.4.3",
"wodge": "~0.6.6",
"handlebars-array": "~0.0"
"wodge": "^0.8.0"
}
}

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