File: verbfile.js

package info (click to toggle)
node-base 0.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 252 kB
  • ctags: 25
  • sloc: makefile: 4; sh: 2
file content (19 lines) | stat: -rw-r--r-- 482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'use strict';

var through = require('through2');

module.exports = function(verb) {
  verb.use(require('verb-readme-generator'));
  verb.task('default', ['readme'], function(cb) {
    return verb.src('README.md')
      .pipe(through.obj(function(file, enc, next) {
        var str = file.contents.toString();
        str = str.replace(/^(#+ \[)\.#/gm, '$1Base.');
        file.contents = new Buffer(str);
        next(null, file);
      }))
      .pipe(verb.dest('.'));
  });
};