Skip to content

Commit

Permalink
Run lint before test instead of before build
Browse files Browse the repository at this point in the history
  • Loading branch information
digawp committed Feb 28, 2016
1 parent c51a930 commit c5ee450
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const eslint = require('gulp-eslint');

gulp.task('help', help);

gulp.task('default', ['lint', 'build']);
gulp.task('default', ['build']);

// //////////////////////////////////////
// BUILDING
Expand All @@ -22,18 +22,6 @@ gulp.task('build', function () {
.pipe(gulp.dest(BUILD_TARGET_DIR));
});

gulp.task('lint', function () {
return gulp.src([
'**/*.js',
'!node_modules/**',
'!coverage/**',
'!socket.io.js'
])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

// //////////////////////////////////////
// TESTING
// //////////////////////////////////////
Expand All @@ -42,7 +30,7 @@ const REPORTER = 'dot';
const TEST_FILE = './test/index.js';
const TEST_SUPPORT_SERVER_FILE = './test/support/server.js';

gulp.task('test', function () {
gulp.task('test', ['lint'], function () {
if (process.env.hasOwnProperty('BROWSER_NAME')) {
return testZuul();
} else {
Expand All @@ -53,6 +41,18 @@ gulp.task('test', function () {
gulp.task('test-node', testNode);
gulp.task('test-zuul', testZuul);

gulp.task('lint', function () {
return gulp.src([
'**/*.js',
'!node_modules/**',
'!coverage/**',
'!socket.io.js'
])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

// runs zuul through shell process
function testZuul () {
const ZUUL_CMD = './node_modules/zuul/bin/zuul';
Expand Down

0 comments on commit c5ee450

Please sign in to comment.