diff --git a/gulpfile.js b/gulpfile.js index 1162e70ee5..a57798c09a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -689,9 +689,16 @@ function buildDemoSass(isProductionMode) { require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig); // requires bundle.system to be run once -gulp.task('karma', ['tests'], function() { +gulp.task('karma', ['tests'], function(done) { var karma = require('karma').server; - return karma.start({ configFile: __dirname + '/scripts/karma/karma.conf.js' }) + karma.start({ + configFile: __dirname + '/scripts/karma/karma.conf.js' + }, function(result) { + if (result > 0) { + return done(new Error('Karma exited with an error')); + } + done(); + }); }); gulp.task('karma-watch', ['watch.tests', 'bundle.system'], function() { @@ -710,8 +717,15 @@ gulp.task('karma-watch', ['watch.tests', 'bundle.system'], function() { * some prerelease magic (see 'prepare') and copies npm package and tooling * files to dist. */ -gulp.task('prerelease', ['prepare', 'build.release'], function(done){ - runSequence('package', done); +gulp.task('prerelease', function(done){ + runSequence( + 'tslint', + 'prepare', + 'build.release', + 'karma', + 'package', + done + ); }); /** @@ -931,11 +945,11 @@ gulp.task('tooling', function(){ /** * TS LINT */ -gulp.task("tslint", function() { - var tslint = require("gulp-tslint"); - gulp.src([ - 'ionic/**/*.ts', - '!ionic/**/test/**/*', - ]).pipe(tslint()) - .pipe(tslint.report('verbose')); +gulp.task('tslint', function(done) { + var tslint = require('gulp-tslint'); + return gulp.src([ + 'ionic/**/*.ts', + '!ionic/**/test/**/*', + ]).pipe(tslint()) + .pipe(tslint.report('verbose')); }); diff --git a/ionic/components/img/img.ts b/ionic/components/img/img.ts index c2b49f30c3..45a6ca04d8 100644 --- a/ionic/components/img/img.ts +++ b/ionic/components/img/img.ts @@ -84,7 +84,7 @@ export class Img { } private _loaded(isLoaded: boolean) { - this._elementRef.nativeElement.classList[isLoaded ? 'add': 'remove']('img-loaded'); + this._elementRef.nativeElement.classList[isLoaded ? 'add' : 'remove']('img-loaded'); } enable(shouldEnable: boolean) { diff --git a/ionic/platform/platform.ts b/ionic/platform/platform.ts index 9655e9258c..b1ace1d408 100644 --- a/ionic/platform/platform.ts +++ b/ionic/platform/platform.ts @@ -190,7 +190,7 @@ export class Platform { triggerReady() { this._zone.run(() => { this._readyResolve(); - }) + }); } /** @@ -741,5 +741,5 @@ export interface PlatformVersion { str?: string; num?: number; major?: number; - minor?: number + minor?: number; }