Skip to content

Commit

Permalink
Beautify code
Browse files Browse the repository at this point in the history
  • Loading branch information
lkrnac committed Jun 23, 2014
1 parent 3e8e2cd commit f87db93
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
29 changes: 17 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});
8 changes: 2 additions & 6 deletions lib/jasstor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
//};

0 comments on commit f87db93

Please sign in to comment.