forked from Nikkei/atlas-tracking-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
29 lines (26 loc) · 1.09 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
const gulp = require('gulp');
const browserify = require('browserify');
const log = require('fancy-log');
const tap = require('gulp-tap');
const buffer = require('gulp-buffer');
const babelify = require('babelify');
gulp.task("build-test-src", () => {
return gulp.src('./test/integration/pages/src/**/*.js', { read: false })
.pipe(tap(function(file) {
log('bundling ' + file.path);
file.contents = browserify(file.path, { debug: false })
.transform(babelify)
.bundle();
}))
.pipe(gulp.dest('./test/integration/pages/assets'));
})
gulp.task('build-test-target-src', () => {
return gulp.src('./src/**/*.js', { read: false })
.pipe(tap(function(file) {
file.contents = browserify(file.path, { debug: false })
.transform(babelify)
.bundle();
}))
.pipe(gulp.dest('./test/integration/pages/assets'));
})
gulp.task("build-test", gulp.series(gulp.parallel("build-test-src", "build-test-target-src")))