diff --git a/gulpfile.js b/gulpfile.js index 1097859..90498f8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,29 +6,34 @@ var mocha = require('gulp-mocha'); var istanbul = require('gulp-istanbul'); var coveralls = require('gulp-coveralls'); - - +//Compiles ES6 into ES5 gulp.task('build', function () { return gulp.src('lib/jasstor.js') - .pipe(traceur({sourceMap: true})) + .pipe(traceur({ + sourceMap: true + })) .pipe(gulp.dest('dist')); }); -gulp.task('test', ['build'], function(){ +//Runs mocha test against compiled ES5 source code +gulp.task('test', ['build'], function () { return gulp.src('test/jasstorSpec.js') - .pipe(mocha({reporter: 'spec'})); + .pipe(mocha({ + reporter: 'spec' + })); }); +//Runs mocha test ands submits coverage to coveralls.io gulp.task('coverage', ['build'], function (cb) { gulp.src(['dist/jasstor.js']) .pipe(istanbul()) // Covering files - .on('finish', function () { - gulp.src(['test/jasstorSpec.js']) - .pipe(mocha()) - // Creating the reports after tests runned - .pipe(istanbul.writeReports()) - .on('end', cb); - }); + .on('finish', function () { + gulp.src(['test/jasstorSpec.js']) + .pipe(mocha()) + // Creating the reports after tests runned + .pipe(istanbul.writeReports()) + .on('end', cb); + }); gulp.src('coverage/lcov.info') .pipe(coveralls()); }); diff --git a/lib/jasstor.js b/lib/jasstor.js index ef1076c..6776964 100644 --- a/lib/jasstor.js +++ b/lib/jasstor.js @@ -6,12 +6,8 @@ * Licensed under the MIT license. */ -module.exports = class Jasstor{ - constructor(storageFile){ +module.exports = class Jasstor { + constructor(storageFile) { } }; - -//exports.awesome = function() { -// return 'awesome'; -//};