forked from webrtc/samples
-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.babel.js
42 lines (34 loc) · 1.05 KB
/
gulpfile.babel.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
'use strict';
import gulp from 'gulp';
import eslint from 'gulp-eslint';
import zip from 'gulp-zip';
import gulpStylelint from 'gulp-stylelint';
import nightwatch from 'gulp-nightwatch';
gulp.task('zip', function() {
return gulp.src('src/content/extensions/desktopcapture/extension/**')
.pipe(zip('desktopCaptureExtension.zip'))
.pipe(gulp.dest('release'));
});
gulp.task('eslint', function() {
return gulp.src(['src/content/**/*.js', 'test/*.js', '!**/third_party/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('stylelint', function() {
return gulp.src('src/**/*.css')
.pipe(gulpStylelint({
reporters: [
{formatter: 'string', console: true}
]
}));
});
gulp.task('nightwatch', function() {
const browser = process.env.BROWSER || 'chrome';
return gulp.src('gulpfile.babel.js')
.pipe(nightwatch({
configFile: 'nightwatch.conf.js',
cliArgs: [`--env ${browser}`]
}));
});
gulp.task('default', gulp.series('eslint', 'stylelint', 'nightwatch'));