-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
verbfile.js
38 lines (31 loc) · 905 Bytes
/
verbfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
'use strict';
var path = require('path');
var trees = require('verb-trees');
var del = require('delete');
var generator = require('./');
/**
* HEADS UP! Verb takes ~2-3 sec. to run because the `trees` task
* has to run all of the generator's tasks to create the trees.
* In other words, it has to generate ~10 projects to get the trees.
*/
module.exports = function(app) {
app.use(require('verb-generate-readme'));
app.option('overwrite', function(file) {
return file.basename === 'test.js';
});
app.use(trees(generator, [
'default',
'base',
'generator',
'updater'
]));
app.task('delete', function(cb) {
del('.temp-trees', cb);
});
app.task('docs', function(cb) {
return app.src('docs/trees.md', {cwd: __dirname})
.pipe(app.renderFile('*'))
.pipe(app.dest(app.cwd));
});
app.task('default', ['trees', 'readme', 'docs', 'delete']);
};