-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
49 lines (39 loc) · 1.43 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
var gulp = require("gulp");
var workspace = require("gulp-npmworkspace");
var path = require("path");
var fs = require("fs");
var process = require("process");
var typings = require("typings");
var rimraf = require("rimraf");
var through = require("through2");
gulp.task("install", function() {
var postInstallActions = [
workspace.postInstallActions.installTypings(),
{
action: function(packageDescriptor, packagePath, callback) {
rimraf.sync(path.join(packagePath, "./typings/**/browser*"));
callback();
}
}
];
return workspace.workspacePackages()
.pipe(workspace.npmInstall({ postInstallActions: postInstallActions, verboseLogging: true }));
});
gulp.task("compile", function() {
return workspace.workspacePackages()
.pipe(workspace.buildTypeScriptProject());
});
gulp.task("run-spec-tests", function() {
return workspace.workspacePackages()
.pipe(workspace.filter(function (packageDescriptor, packagePath) {
return packageDescriptor.name === "gulp-npmworkspace-specs"
}))
.pipe(workspace.runCucumber());
});
gulp.task("publish", function() {
return workspace.workspacePackages()
.pipe(workspace.filter(function (packageDescriptor, packagePath) {
return !packageDescriptor.private
}))
.pipe(workspace.npmPublish({ shrinkWrap: false, bump: "patch" }));
});