Skip to content

Commit

Permalink
NEXT-66 Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
kscc25 committed Mar 19, 2016
1 parent 5cca62c commit 986f88a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"esnext": true,
"requirePaddingNewLinesAfterBlocks": false,
"disallowMultipleVarDecl": false,
"requireCamelCaseOrUpperCaseIdentifiers": { "ignoreProperties": true }
"requireCamelCaseOrUpperCaseIdentifiers": { "ignoreProperties": true },
"requireDollarBeforejQueryAssignment": false
}
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 0 additions & 2 deletions client/js/controller.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -37,7 +36,6 @@ export default class Controller {
_this.connector.findParty(dom.region.val());
});


client.on('scoreUpdate', () => {
dom.statusBox.html(`Score: ${client.score}`);
});
Expand Down
2 changes: 1 addition & 1 deletion client/js/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export default {
nick: nick,
playBtn: playBtn,
region: region,
gameMode: gameMode
gameMode: gameMode,
};
21 changes: 13 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('.'))
Expand All @@ -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 () {
Expand All @@ -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');
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 986f88a

Please sign in to comment.