forked from angular/protractor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
39 lines (34 loc) · 1008 Bytes
/
gulpfile.js
File metadata and controls
39 lines (34 loc) · 1008 Bytes
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
'use strict';
var gulp = require('gulp');
var runSequence = require('run-sequence');
var spawnSync = require('child_process').spawnSync;
gulp.task('built:copy', function() {
var srcFiles = ['lib/**/*'];
var dist = 'built/';
return gulp.src(srcFiles).pipe(gulp.dest(dist));
});
gulp.task('webdriver:update', function() {
var child = spawnSync('bin/webdriver-manager', ['update']);
if (child.stdout != null) {
console.log(child.stdout.toString());
}
if (child.status !== 0) {
throw new Error('webdriver-manager update: child error');
}
});
gulp.task('jslint', function() {
var child = spawnSync('./node_modules/.bin/jshint', ['lib','spec', 'scripts']);
if (child != null && child.stdout != null ) {
console.log(child.stdout.toString());
}
if (child.status !== 0) {
throw new Error('jslint: child error');
}
});
gulp.task('pretest', function() {
runSequence(
['webdriver:update', 'jslint'],
'built:copy'
);
});
gulp.task('prepublish', ['built:copy']);