-
Notifications
You must be signed in to change notification settings - Fork 7
/
gulpfile.js
56 lines (40 loc) · 1.13 KB
/
gulpfile.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var watch = require('gulp-watch')
var chext = require("chext");
var jsdoc = require("gulp-jsdoc");
var glob = require("glob");
var unitTests = ['test/generate-key'];
var srcFiles = ['src/**/*.js'];
gulp.task('mocha', function() {
return gulp.src( unitTests, { read: false })
.pipe(mocha({ reporter: 'list' }))
.on('error', function(){
})
.on('end', function(){
});
});
var plato = require('plato');
var files = glob.sync("ciphers/*/*.js").concat(['e3x.js']);
var outputDir = './plato';
// null options for this example
var options = {
title: 'Your title here'
};
var callback = function (report){
// once done the analysis,
// execute this
};
gulp.task('doc', function(){
plato.inspect(files, outputDir, {}, callback);
gulp.src(["./lib/*.js", "./ext/*.js"])
.pipe(jsdoc('./doc'))
})
gulp.task('dev', function() {
var ch = new chext()
ch.watchify(unitTests)
ch.onresults = function(results){
console.log("tests complete", results)
}
gulp.watch(unitTests.concat(srcFiles), ["mocha"])
})