From c89ef457b694920438f26b0a16d7d98d1cb46441 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Sat, 15 Oct 2016 12:36:49 -0400 Subject: [PATCH] Removing karma gulp tasks in favor or npm script --- .travis.yml | 3 +-- gulpfile.js | 18 ++---------------- package.json | 3 +++ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 095e2c9..361ff3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,5 @@ node_js: before_script: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - - npm install -g gulp - sleep 3 -script: gulp verify +script: npm test diff --git a/gulpfile.js b/gulpfile.js index af5f07e..663ebb8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -13,7 +13,6 @@ const gulp = require('gulp-help')(require('gulp')), buffer = require('vinyl-buffer'), sourcemaps = require('gulp-sourcemaps'), babelify = require('babelify'), - karma = require('karma'), path = require('path'), jscs = require('gulp-jscs'), config = require('./config'); @@ -109,22 +108,9 @@ gulp.task('styles', 'Build stylesheets into ./build directory.', function() { .pipe(gulp.dest(config.buildPath('css'))) }); -gulp.task('verify', 'Verify (lint and run tests) scripts.', ['karma:single', 'lint']); +gulp.task('verify', 'Verify (lint and run tests) scripts.', ['lint']); -gulp.task('verify:watch', 'Auto-verify scripts.', ['karma', 'lint:watch']); - -gulp.task('karma', 'Auto-run scripting tests.', function(done) { - new karma.Server({ - configFile: path.join(__dirname, 'karma.conf.js') - }, done).start(); -}); - -gulp.task('karma:single', 'Run scripting tests', function(done) { - new karma.Server({ - configFile: path.join(__dirname, 'karma.conf.js'), - singleRun: true - }, done).start(); -}); +gulp.task('verify:watch', 'Auto-verify scripts.', ['lint:watch']); gulp.task('lint', 'Lint scripts', function() { return gulp.src(config.globs.lint) diff --git a/package.json b/package.json index e5d7c4a..c0dbadb 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ }, "license": "MIT", "private": true, + "scripts": { + "test": "karma start --single-run" + }, "devDependencies": { "babel-core": "^6.17.0", "babel-loader": "^6.2.5",