diff --git a/.travis.yml b/.travis.yml index 421e3c52..f35163c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ before_script: - psql -c 'create database lux_test;' -U postgres - touch test/test-app/db/lux_test_test.sqlite - cd test/test-app && npm install && cd ../../ + - npm install -g eslint babel-eslint - npm link env: diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 0c01d59c..ffdb8a5a 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,7 +1,6 @@ import gulp from 'gulp'; import babel from 'gulp-babel'; import mocha from 'gulp-mocha'; -import eslint from 'gulp-eslint'; import uglify from 'gulp-uglify'; import rmrf from './src/packages/cli/utils/rmrf'; @@ -10,20 +9,13 @@ gulp.task('clean', () => { return rmrf('dist'); }); -gulp.task('build', ['lint', 'clean'], () => { +gulp.task('build', ['clean'], () => { return gulp.src('src/**/*.js') .pipe(babel()) .pipe(uglify()) .pipe(gulp.dest('dist')); }); -gulp.task('lint', () => { - return gulp.src('src/**/*.js') - .pipe(eslint()) - .pipe(eslint.format()) - .pipe(eslint.failAfterError()); -}); - gulp.task('test', ['build'], () => { return gulp.src([ 'test/helper.js', diff --git a/package.json b/package.json index 05b8ede3..2a150247 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,10 @@ "lux": "bin/lux" }, "scripts": { + "build": "npm run lint && gulp build", + "lint": "eslint ./src/**", "start": "lux serve", - "test": "gulp test" + "test": "npm run lint && gulp test" }, "author": "Zachary Golba", "license": "MIT", @@ -34,7 +36,6 @@ "babel-preset-es2015": "6.6.0", "babel-preset-stage-1": "6.5.0", "chai": "3.5.0", - "eslint": "2.8.0", "gulp": "3.9.1", "gulp-babel": "6.1.2", "gulp-eslint": "2.0.0",