# gulp-comment2md

> Generates markdown files from JavaScript comments

Latest version **1.0.3** (published 2015-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-comment2md
pnpm add gulp-comment2md
yarn add gulp-comment2md
bun add gulp-comment2md
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-07-13 |
| First published | 2015-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Hiroyuki ANAI |
| Maintainers | pirosikick |
| Keywords | gulp, markdown |

## Links

- npm: https://www.npmjs.com/package/gulp-comment2md
- Repository: https://github.com/pirosikick/gulp-comment2md
- Issues: https://github.com/pirosikick/gulp-comment2md/issues
- npm.io page: https://npm.io/package/gulp-comment2md

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^3.5.0
- [through2](https://npm.io/package/through2.md) ^0.6.3
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.4

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2015-07-13
- 1.0.2 — 2015-06-03
- 1.0.1 — 2015-04-14
- 1.0.0 — 2015-04-07

## README

[![npm version](https://badge.fury.io/js/gulp-comment2md.svg)](http://badge.fury.io/js/gulp-comment2md)
[![david](https://david-dm.org/pirosikick/gulp-comment2md.svg)](https://david-dm.org/pirosikick/gulp-comment2md)
[![Build Status](https://travis-ci.org/pirosikick/gulp-comment2md.svg)](https://travis-ci.org/pirosikick/gulp-comment2md)

# gulp-comment2md

gulp-commnet2md is a gulp plugin that generates markdown file from JavaScript comments.

## Install

```sh
$ npm install gulp-comment2md --save-dev
```

## Example

gulp-comment2md generates markdown file from block comments which start with `/**md` or `/*markdown`:
```javascript
// src/hello.js

/**md
 * # THIS FILE IS IMPORTANT!!!
 *
 * - one
 * - two
 * - three
 *
 */
function hello() {
  console.log('hello world');
}
```

```javascript
// gulpfile.js

var gulp = require('gulp');
var comment2md = require('gulp-comment2md');

gulp.task('markdown', function () {
  gulp.src('./src/**/*.js')
    .pipe(comment2md())
    .pipe(gulp.dest('./doc')); // This task will generate `doc/hello.md`
});
```

### Rename output file

If you want to rename output markdown files, you can pass String or Function as
comment2md argument:

```javascript
// String
gulp.task('markdown', function () {
  gulp.src('./src/**/*.js')
    .pipe(comment2md("new-name.md"))
    .pipe(gulp.dest('./doc')); // This task will generate `doc/new-name.md`
});

// Function
function rename (file) {
  return 'new-name.md';
}

gulp.task('markdown', function () {
  gulp.src('./src/**/*.js')
    .pipe(comment2md(rename))
    .pipe(gulp.dest('./doc')); // This task will generate `doc/new-name.md`
});
```

## License

MIT

---
_Source: https://npm.io/package/gulp-comment2md · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
