-
Notifications
You must be signed in to change notification settings - Fork 134
/
gulpfile.js
44 lines (32 loc) · 1.01 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
"use strict";
var gulp = require("gulp");
var del = require("del");
var VERSION = require("./package.json").version;
var COMPONENTS = require("./components.json");
require("dotenv").config();
gulp.task("clean", function () {
return del(["./dist"]);
});
COMPONENTS.forEach(function (component) {
require("./tasks/" + component);
});
require("./tasks/frame-service");
require("./tasks/build");
require("./tasks/release");
require("./tasks/jsdoc");
require("./tasks/test");
function setNpmVersion() {
process.env.npm_package_version = VERSION;
return Promise.resolve();
}
function watch() {
process.env.BRAINTREE_JS_ENV = "development";
COMPONENTS.forEach(function (component) {
gulp
.watch(["src/" + component + "/**", "src/lib/**"])
.on("change", gulp.series("build:" + component));
});
gulp.watch(["src/**/*", "jsdoc/*"], gulp.series("jsdoc"));
}
gulp.task("build:integration", gulp.series(setNpmVersion, "build", "jsdoc"));
gulp.task("watch:integration", gulp.series(setNpmVersion, watch));