
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
A jsdoc-ish documentation generator forked from visionmedia/dox.
someobject['asdf-jkl']
.@event
@fires
@auth
@augments
jsdoxy
.
@class MyClass
tag as the key.Note
You must use the @class
comment as your first comment per file. @class myClass
is used
to organize the output (this is different than the original Dox project. If you fail to do this,
you will have no output.
One file at a time.
npm install -g jsdoxy
You can do this from the terminal
$> jsdoxy --help
Usage: jsdoxy [options]
Options:
-h, --help output usage information
-V, --version output the version number
-r, --raw output "raw" comments, leaving the markdown intact
-a, --api output markdown readme documentation
-d, --debug output parsed comments for debugging
Examples:
# stdin
$ jsdoxy > myfile.json
# operates over stdio
$ jsdoxy < myfile.js > myfile.json
Multiple files at a time, organizing the output by the @class
tag, optionally rendered using a jade template.
Install the package to your project with NPM
npm install jsdoxy --save-dev
then in your source code, the @class
tag should always be part of the first comment
/**
* A class that does something.
*
* Use it in this way.
* @class MyClass
* @param object opts Some parameters to get you started.
*/
function MyClass (opts) {
. . .
}
then inside Gruntfile.js
at the project root
grunt.loadNpmTasks('jsdoxy');
grunt.initConfig({
jsdoxy: {
options: {
// JSON data representing your code. Not optional.
jsonOutput: 'jsdoxy-output.json',
// A Jade template which will receive the locals below. Optional.
// Set to `false` to disable building this template. Other falsey values
// will use the default template.
template: 'your-template.jade',
// when using a template, what is the base path for all of the links
// to work from?
basePath: '', // '/docs'
// Indicates whether to output things marked @private when building docs
outputPrivate: false,
// make an index landing page
generateIndex: false,
// flatten the outputted files into one directory
flatten: false,
// path to a custom stylesheet
stylesheet: "https://maxcdn.bootstrapcdn.com/bootswatch/3.3.4/paper/bootstrap.min.css"
},
files: {
src: [ . . . ],
dest: '. . .'
}
}
});
yields jsdoxy-output.json
{
"MyClass": {
"tags": [
{
"type": "class",
"string": "MyClass"
},
{
"type": "param",
"types": [
"object"
],
"name": "opts",
"description": "Some parameters to get you started."
}
],
"returns": "Object || String",
"fires": [{ "type": "fires", "string": "some-event" }],
"description": {
"full": "<p>A class that does something.</p><p>Use it in this way.</p>",
"summary": "<p>A class that does something.</p>",
"body": "<p>Use it in this way.</p>"
},
"isPrivate": false,
"ignore": false,
"code": "function MyClass(opts) { . . . }",
"ctx": {
"type": "declaration",
"name": "MyClass",
"string": "idk what goes here",
"file": {
"input": "./input/file/path/file.js",
"output": "./output/file/path/file.js.json"
}
}
}
}
There is a default template which will be used unless you pass the config option template: false
.
If you pass an empty string or do not include anything, it will render using the
default-template.jade
in this repository.
The jade template will receive the following locals:
var jadeLocals = {
structure: organizedByClass,
comments: thisClassDocs,
className: classKey,
link: classCommentLink,
files: allFileLinks,
basePath: basePath,
filenameOut: filenameOut
};
Any markdown files with the extension .md
will be turned into HTML files and rendered
with the jade template.
The following CSS classes are exposed:
.docs
.docs--sidebar
.docs--main
.docs--subtitle
.docs--title
(c) 2014 - 2015 Jeff H. Parrish
MIT
Forked from tj/dox
FAQs
jsdoc documentation generator
The npm package jsdoxy receives a total of 12 weekly downloads. As such, jsdoxy popularity was classified as not popular.
We found that jsdoxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.