File: verbfile.js

package info (click to toggle)
node-base 3.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 252 kB
  • sloc: javascript: 604; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 472 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict';

var through = require('through2');

module.exports = function(app) {
  app.use(require('verb-generate-readme'));
  app.task('default', ['readme'], function(cb) {
    return app.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(app.dest('.'));
  });
};