
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
amd-doc is a JavaScript documentation generator for AMD-based projects. It post-processes the JSON output of jsdoc3, using RequireJS configuration and AMD conventions to infer more information.
npm install amd-doc
The main functionality of amd-doc is exposed through the compile
function. It
returns a Deferred object
and accepts an opts
argument which can contain these properties (example from
deferreds.js):
var amddoc = require('amd-doc');
amddoc.compile({
//globbing-supported String or Array of Strings with process-relative
//files to process for documentation. Entries starting with "!" will be excluded.
files: 'src/deferreds/**/*.js',
//directory to output generated HTML (default = 'doc/out')
out: 'doc/out',
//directory to store jsdoc cache (default = 'doc/cache')
cache: 'doc/cache',
//directory to look for markdown mixins (default = 'doc/mixin')
mixin: 'doc/mixin',
//github URL where source is available. the file path and line number of
//each documented variable will be added to this to make source links.
repoview: 'https://github.com/zship/deferreds.js/blob/develop/',
//Array of Type (see tasks/doc/Types.js) objects to transform into links
//when used as parameter types, return types, or description namepaths
types: (function() {
var types = [];
//make all built-in types link to their MDN pages
['Number', 'String', 'Object', 'Function', 'Array', 'RegExp', 'Boolean'].forEach(function(val) {
types.push({
name: val,
link: 'https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/' + val
});
});
types.push({
name: 'Any',
link: 'https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects'
});
types.push({
name: 'void',
link: 'https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/undefined'
});
types.push({
name: 'Element',
link: 'https://developer.mozilla.org/en-US/docs/DOM/element'
});
types.push({
name: 'jQuery',
link: 'http://api.jquery.com/jQuery/'
});
types.push({
name: 'require',
link: 'http://requirejs.org/'
});
types.push({
//any name matching this RegExp (with name.search()) will be given
//the following link
regexp: /amd-utils\/.*/,
link: 'http://millermedeiros.github.com/amd-utils/'
});
return types;
})(),
//requirejs configuration object
//more: https://github.com/jrburke/r.js/blob/master/build/example.build.js
//amd-doc uses `basePath`, `paths`, and `packages` (all optional) to
//transform file names to AMD module names.
requirejs: {
baseUrl: 'src/deferreds',
optimize: 'none',
packages: [
{ name: 'amd-utils', location: '../lib/amd-utils' }
],
}
});
@lends
, any name may be specified and it will be replaced by
the last part of the module name (i.e. /** @lends __.prototype */
will
apply its properties to the only class defined in the file, regardless of
the existence of a variable __
)@namespace
may be used by itself (with no name to assign to the
namespace)h2
s (##
) in the file will be matched
against variable names in your source, and content under the h2
will
replace the description for that variable{}
, and if there is a matching
documented variable, the namepath will be converted to a link.{joss/geometry/Rect#moveTop}
becomes Rect.moveTop{Rect#moveTop}
also becomes Rect.moveTop, if
the short-name "Rect" is not declared more than once{joss/geometry/Rect}
becomes Rect. (it's a Type name, not a
jsdoc namepath)@extend
multiple Classes is
computed.code
and pre
blocks will be processed by
highlight-jsjoss/geometry/Rect
and
joss/display/Rect
are unique modules, but the last part (the
short-name) of both is Rect
)amd-doc was created as the documentation generator for the joss framework.
FAQs
Documentation generator for AMD-based projects
We found that amd-doc 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.