This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

gulp-read-my-comments

0.0.2 • Public • Published

gulp-read-my-comments

Gulp task to transform C family block comment texts into contents meant to be dumped out to a file.

Let's say you have a src/js/app.js:

/**
 * # This is my application.
 *
 * I need the dual stars in the opening comment, and stars on each line of the
 * comment to be parsed.
 *
 * We assume you're using _markdown_ but this plugin doesn't do any parsing other
 * than grabbing the content out of the comments.
 *
 * What remains in gulp will be a set of files that actually have content, and
 * their file contents will be transformed to the content of the comments, minus
 * the comment markers.
 */

And you'll have a gulpfile.js that looks something like:

var clean = require("gulp-clean");
var readMyComments = require("gulp-read-my-comments");
var gulp = require("gulp");
var rename = require("gulp-rename");
 
gulp.task("docs:client:clean", function() {
    return gulp.src(["docs/client/*"])
        .pipe(clean());
});
 
gulp.task("docs:client:build", ["docs:clean"], function() {
    gulp.src(["src/js/*"])
        .pipe(readMyComments())
        .pipe(rename({
            extname: ".md",
        }))
        .pipe(gulp.dest("docs/client/"));
});
 
gulp.task("docs:client", ["docs:client:clean", "docs:client:build"]);

The above will place a docs/client/app.md file.

The reason this project exists is to make it easier for me to quickly write docs and check them into github and take advantage of github's markdown highlighting vs. needing to host html files myself (in particular for private repos).

Readme

Keywords

Package Sidebar

Install

npm i gulp-read-my-comments

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • jeremyosborne