DocExtractor is a Node.js script designed to extract comments from CSS, SCSS, and JavaScript files and generate Markdown documentation files. It provides a command-line interface (CLI) for easy usage.
Refer to the ZumerBox bundle for more information and tools.
npm install @zumerbox/doc-extractor --save-devTo use DocExtractor, run it from the command line with the following syntax:
npx doc-extractor [entryPath] [options]-
[entryPath]: Path to the entry file, multiple files, or a folder containing the files to extract comments from. -
-folder [outputFolder]: Specify the output folder for the generated Markdown files. (Default: 'output') -
-multiple: Generate one Markdown file per input file. By default, a consolidated Markdown file named 'docs.md' will be created. -
-scss-imports: Include this flag to process SCSS files with@importstatements. It will extract comments from imported files as well.
Extract comments from a single file:
npx doc-extractor index.jsExtract comments from multiple files:
npx doc-extractor src -multipleGenerate documentation for SCSS files with imports:
npx doc-extractor styles/main.scss -scss-imports