https://github.com/zumerlab/zumerbox-doc-extractor
https://github.com/zumerlab/zumerbox-doc-extractor
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zumerlab/zumerbox-doc-extractor
- Owner: zumerlab
- Created: 2024-04-05T17:38:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T08:14:06.000Z (almost 2 years ago)
- Last Synced: 2025-03-16T22:37:03.624Z (11 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# @zumerbox/doc-extractor
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](https://github.com/zumerlab/zumerbox) for more information and tools.
## Installation
```bash
npm install @zumerbox/doc-extractor --save-dev
```
## Usage
To use DocExtractor, run it from the command line with the following syntax:
```bash
npx doc-extractor [entryPath] [options]
```
### 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 `@import` statements. It will extract comments from imported files as well.
### Example:
Extract comments from a single file:
```bash
npx doc-extractor index.js
```
Extract comments from multiple files:
```bash
npx doc-extractor src -multiple
```
Generate documentation for SCSS files with imports:
```bash
npx doc-extractor styles/main.scss -scss-imports
```