diff --git a/.jscsrc b/.jscsrc index 1c7f3a9..b0c4635 100644 --- a/.jscsrc +++ b/.jscsrc @@ -3,5 +3,6 @@ "esnext": true, "requirePaddingNewLinesAfterBlocks": false, "disallowMultipleVarDecl": false, - "requireCamelCaseOrUpperCaseIdentifiers": { "ignoreProperties": true } + "requireCamelCaseOrUpperCaseIdentifiers": { "ignoreProperties": true }, + "requireDollarBeforejQueryAssignment": false } diff --git a/.travis.yml b/.travis.yml index 0169bc2..6559a43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,15 @@ language: node_js node_js: - "4.1" +env: + - CXX=g++-4.8 +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 + notifications: webhooks: urls: @@ -22,9 +31,7 @@ before_script: - jspm install script: - - ./node_modules/.bin/gulp lint - - ./node_modules/.bin/gulp test - - ./node_modules/.bin/gulp build + - ./node_modules/.bin/gulp after_success: - bash deploy.sh diff --git a/client/js/controller.js b/client/js/controller.js index 95e32e4..88b1a55 100644 --- a/client/js/controller.js +++ b/client/js/controller.js @@ -1,6 +1,5 @@ 'use strict'; -import Dat from 'dat-gui'; import Connector from './connector'; import constants from './constants'; import AgarioClient from './agario-client/client'; @@ -37,7 +36,6 @@ export default class Controller { _this.connector.findParty(dom.region.val()); }); - client.on('scoreUpdate', () => { dom.statusBox.html(`Score: ${client.score}`); }); diff --git a/client/js/dom.js b/client/js/dom.js index 001be60..650f336 100644 --- a/client/js/dom.js +++ b/client/js/dom.js @@ -19,5 +19,5 @@ export default { nick: nick, playBtn: playBtn, region: region, - gameMode: gameMode + gameMode: gameMode, }; diff --git a/gulpfile.js b/gulpfile.js index b1af9c4..0694df5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -14,20 +14,20 @@ var browserSync = require('browser-sync').create(); var mocha = require('gulp-mocha'); gulp.task('css', function () { - gulp.src(['client/css/layout.css']) + return gulp.src(['client/css/layout.css']) .pipe(cssMin()) .pipe(rename({ suffix: '.bundle' })) .pipe(gulp.dest('build/css/')); }); gulp.task('html', function () { - gulp.src(['client/index.html']) + return gulp.src(['client/index.html']) .pipe(htmlMin({ collapseWhitespace: true })) .pipe(gulp.dest('build/')); }); gulp.task('js', function () { - gulp.src(['client/js/main.js']) + return gulp.src(['client/js/main.js']) .pipe(sourcemaps.init()) .pipe(jspm({ selfExecutingBundle: true })) .pipe(sourcemaps.write('.')) @@ -49,8 +49,8 @@ gulp.task('server', function () { }); }); -gulp.task('build', function () { - runSeq(['css', 'html', 'js']); +gulp.task('build', function (callback) { + return runSeq(['css', 'html', 'js'], callback); }); gulp.task('watch', function () { @@ -73,14 +73,19 @@ gulp.task('jshint', function () { gulp.task('jscs', function () { return gulp.src(['./client/js/*.js', './test/*.js', './gulpfile.js']) .pipe(jscs()) - .pipe(jscs.reporter()); + .pipe(jscs.reporter()) + .pipe(jscs.reporter('fail')); }); -gulp.task('lint', function () { - runSeq('jshint', 'jscs'); +gulp.task('lint', function (callback) { + return runSeq('jshint', 'jscs', callback); }); gulp.task('test', function () { return gulp.src(['./test/*.js']) .pipe(mocha()); }); + +gulp.task('default', function () { + runSeq('lint', 'test', 'build'); +}); diff --git a/package.json b/package.json index 851f0cf..252fef5 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "gulp-htmlmin": "1.3.0", "gulp-jscs": "3.0.2", "gulp-jshint": "2.0.0", - "gulp-jspm": "0.5.6", + "gulp-jspm": "heroandtn3/gulp-jspm#issue-22", "gulp-mocha": "2.2.0", "gulp-rename": "1.2.2", "gulp-sourcemaps": "1.6.0",