Getting Started
Installation
Section titled “Installation”When using the Node API, you can install the package into your project’s dependencies.
npm install mdnmanWhen using the MDNMan CLI, it is recommended to install globally.
npm install --global mdnmanNode API
Section titled “Node API”import { findMDNFile, getHeader, completeParse,} from 'mdnman';
const file = await findMDNFile('foreach');if (!file) return;const header = getHeader(file);if (!header) return;const parsedFile = completeParse(file, header.slug, false);console.log(parsedFile)Invoke the MDNMan command line interface with the mdnman command.
mdnmanUsage: mdnman [options] [command]
MDN reference CLI
Options: -h, --help display help for command
Commands: js [options] <query> Search the MDN JavaScript reference library html [options] <query> Search the MDN HTML reference library css [options] <query> Search the MDN CSS reference library glossary [options] <query> Search the MDN Glossary interactive [options] Use prompts to search the entire MDN reference library help [command] Get help for specific commandA complete command with options would look like this.
mdnman interactive --output file --path ./my-mdn-doc.md