-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathgulpfile.js
84 lines (78 loc) · 2.3 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
var gulp = require("gulp");
var concat = require("gulp-concat");
var intellExtractChromeFiles = [
"src/webdext.init.js",
"src/webdext.xpath.js",
"src/webdext.sequal.js",
"src/webdext.model.js",
"src/webdext.similarity.js",
"src/webdext.extraction.js",
"src/webdext.chrome.intellextract.js"
];
var wrapperExtractChromeFiles = [
"src/webdext.init.js",
"src/webdext.wrapper.js",
"src/webdext.chrome.wrapperextract.js"
];
var inductWrapperChromeFiles = [
"src/webdext.init.js",
"src/webdext.xpath.js",
"src/webdext.sequal.js",
"src/webdext.induction.js",
"src/webdext.chrome.inductwrapper.js"
];
var intellExtractHeadlessFiles = [
"src/webdext.init.js",
"src/webdext.xpath.js",
"src/webdext.sequal.js",
"src/webdext.model.js",
"src/webdext.similarity.js",
"src/webdext.extraction.js"
];
var wrapperExtractHeadlessFiles = [
"src/webdext.init.js",
"src/webdext.wrapper.js"
];
var chromeDebugFiles = [
"src/webdext.init.js",
"src/webdext.xpath.js",
"src/webdext.sequal.js",
"src/webdext.model.js",
"src/webdext.similarity.js",
"src/webdext.extraction.js",
"src/webdext.wrapper.js",
"src/webdext.induction.js"
];
gulp.task("build-chrome", [], function() {
console.log("Build as Chrome extension");
gulp.src(intellExtractChromeFiles)
.pipe(concat("webdext-intellextract.js"))
.pipe(gulp.dest("build/"));
gulp.src(wrapperExtractChromeFiles)
.pipe(concat("webdext-wrapperextract.js"))
.pipe(gulp.dest("build/"));
gulp.src(inductWrapperChromeFiles)
.pipe(concat("webdext-inductwrapper.js"))
.pipe(gulp.dest("build/"));
gulp.src("chrome/**/*")
.pipe(gulp.dest("build/"));
});
gulp.task("build-phantom", [], function() {
console.log("Build as Chrome extension");
gulp.src(intellExtractHeadlessFiles)
.pipe(concat("webdext-intellextract.js"))
.pipe(gulp.dest("build/"));
gulp.src(wrapperExtractHeadlessFiles)
.pipe(concat("webdext-wrapperextract.js"))
.pipe(gulp.dest("build/"));
gulp.src("phantom/**/*")
.pipe(gulp.dest("build/"));
});
gulp.task("build-chrome-debug", [], function() {
console.log("Build as Chrome extension for debugging");
gulp.src(chromeDebugFiles)
.pipe(concat("webdext.js"))
.pipe(gulp.dest("build/"));
gulp.src("chrome-debug/**/*")
.pipe(gulp.dest("build/"));
});