Skip to content

Commit e1e03db

Browse files
authored
update gulp test to include lint (#3003)
* update gulp test to include lint * adding lint erro in appnexus adapter to test circleci * fixing lint error previous test commit added
1 parent 11ec22a commit e1e03db

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

gulpfile.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var port = 9999;
3939
// Tasks
4040
gulp.task('default', ['webpack']);
4141

42-
gulp.task('serve', ['lint', 'build-bundle-dev', 'watch', 'test']);
42+
gulp.task('serve', ['build-bundle-dev', 'watch', 'test']);
4343

4444
gulp.task('serve-nw', ['lint', 'watch', 'e2etest']);
4545

@@ -49,8 +49,8 @@ gulp.task('build', ['build-bundle-prod']);
4949

5050
gulp.task('clean', function () {
5151
return gulp.src(['build'], {
52-
read: false
53-
})
52+
read: false
53+
})
5454
.pipe(clean());
5555
});
5656

@@ -78,13 +78,13 @@ var explicitModules = [
7878

7979
function bundle(dev, moduleArr) {
8080
var modules = moduleArr || helpers.getArgModules(),
81-
allModules = helpers.getModuleNames(modules);
81+
allModules = helpers.getModuleNames(modules);
8282

83-
if(modules.length === 0) {
83+
if (modules.length === 0) {
8484
modules = allModules.filter(module => !explicitModules.includes(module));
8585
} else {
8686
var diff = _.difference(modules, allModules);
87-
if(diff.length !== 0) {
87+
if (diff.length !== 0) {
8888
throw new gutil.PluginError({
8989
plugin: 'bundle',
9090
message: 'invalid modules: ' + diff.join(', ')
@@ -106,13 +106,13 @@ function bundle(dev, moduleArr) {
106106
gutil.log('Generating bundle:', outputFileName);
107107

108108
return gulp.src(
109-
entries
110-
)
109+
entries
110+
)
111111
.pipe(gulpif(dev, sourcemaps.init({loadMaps: true})))
112112
.pipe(concat(outputFileName))
113113
.pipe(gulpif(!argv.manualEnable, footer('\n<%= global %>.processQueue();', {
114-
global: prebid.globalVarName
115-
}
114+
global: prebid.globalVarName
115+
}
116116
)))
117117
.pipe(gulpif(dev, sourcemaps.write('.')));
118118
}
@@ -186,7 +186,7 @@ gulp.task('webpack', ['clean'], function () {
186186
// If --file "<path-to-test-file>" is given, the task will only run tests in the specified file.
187187
// If --browserstack is given, it will run the full suite of currently supported browsers.
188188
// If --browsers is given, browsers can be chosen explicitly. e.g. --browsers=chrome,firefox,ie9
189-
gulp.task('test', ['clean'], function (done) {
189+
gulp.task('test', ['clean', 'lint'], function (done) {
190190
var karmaConf = karmaConfMaker(false, argv.browserstack, argv.watch, argv.file);
191191

192192
var browserOverride = helpers.parseBrowserArgs(argv).map(helpers.toCapitalCase);
@@ -229,7 +229,7 @@ gulp.task('watch', function () {
229229
'modules/**/*.js',
230230
'test/spec/**/*.js',
231231
'!test/spec/loaders/**/*.js'
232-
], ['lint', 'build-bundle-dev', 'test']);
232+
], ['build-bundle-dev', 'test']);
233233
gulp.watch([
234234
'loaders/**/*.js',
235235
'test/spec/loaders/**/*.js'
@@ -264,7 +264,7 @@ gulp.task('docs', ['clean-docs'], function () {
264264

265265
gulp.task('e2etest', ['devpack', 'webpack'], function() {
266266
var cmdQueue = [];
267-
if(argv.browserstack) {
267+
if (argv.browserstack) {
268268
var browsers = require('./browsers.json');
269269
delete browsers['bs_ie_9_windows_7'];
270270

@@ -276,11 +276,11 @@ gulp.task('e2etest', ['devpack', 'webpack'], function() {
276276

277277
var startWith = 'bs';
278278

279-
Object.keys(browsers).filter(function(v){
279+
Object.keys(browsers).filter(function(v) {
280280
return v.substring(0, startWith.length) === startWith && browsers[v].browser !== 'iphone';
281-
}).map(function(v,i,arr) {
282-
var newArr = (i%2 === 0) ? arr.slice(i,i+2) : null;
283-
if(newArr) {
281+
}).map(function(v, i, arr) {
282+
var newArr = (i % 2 === 0) ? arr.slice(i, i + 2) : null;
283+
if (newArr) {
284284
var cmd = 'nightwatch --env ' + newArr.join(',') + cmdStr;
285285
cmdQueue.push(cmd);
286286
}

0 commit comments

Comments
 (0)