-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
54 lines (42 loc) · 1.34 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
const { src, dest, parallel } = require('gulp');
const typedoc = require("gulp-typedoc");
const bumpversion = require('gulp-bump');
// `fs` is used instead of require to prevent caching in watch (require caches)
const fs = require('fs');
function getVersion() {
return fs.readFileSync('./VERSION', 'utf8', function(err, data) {
return data;
});
};
function doc() {
return src(["src/**/*.ts"])
.pipe(typedoc({
name: "Polpware typescript utilities (3.0.0)",
out: "docs/",
module: "commonjs",
target: "es5",
exclude: "src/**/t.spec.ts",
experimentalDecorators: true,
excludePrivate: true,
excludeExternals: true,
"lib": [
"lib.dom.d.ts",
"lib.es2015.d.ts",
"lib.es2016.d.ts"
]
}));
}
function bump() {
const newVer = getVersion().trim();
// bump versions on package/bower/manifest
return src(['./package.json'])
.pipe(bumpversion({
version: newVer
}))
.pipe(dest(function(x) {
return x.base;
}));
}
exports.bump = bump;
exports.doc = doc;
exports.default = doc;