Skip to content

Commit

Permalink
jshint via gulp
Browse files Browse the repository at this point in the history
  • Loading branch information
mamboer committed Mar 27, 2015
1 parent db6dd87 commit 4596788
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
19 changes: 19 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
jshintStylish = require('jshint-stylish'),
pkg = require('./package.json');

gulp.task('lint',function(){

return gulp.src(['index.js','lib/**/*.js'])
.pipe(jshint())
.pipe(jshint.reporter(jshintStylish));

});

gulp.task('watch', function() {
gulp.watch(['lib/**/*.js','index.js'],['lint']);
});


gulp.task('default', ['lint','watch']);
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*jslint node: true */
'use strict';

var FileInfo = require('./lib/fileinfo.js');
Expand Down
5 changes: 3 additions & 2 deletions lib/configs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*jslint node: true */
var checkExists = require('./checkFolder.js');

var options = {
Expand Down Expand Up @@ -85,8 +86,8 @@ var options = {
case 'storage':
this.storage.type = opt.type || this.storage.type;
if(opt.aws){
for(var c in opt.aws){
this.storage.aws[c] = opt.aws[c];
for(var c1 in opt.aws){
this.storage.aws[c1] = opt.aws[c1];
}
}

Expand Down
1 change: 1 addition & 0 deletions lib/fileinfo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*jslint node: true */
'use strict';

var fs = require('fs');
Expand Down
8 changes: 5 additions & 3 deletions lib/transport/aws.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*jslint node: true */
'use strict';

var fs = require('fs');
Expand Down Expand Up @@ -36,9 +37,10 @@ module.exports = function (opts){
var files = [];
var options = this.options;
api.s3.listObjects(params, function(err, data) {
if (err) console.log(err, err.stack);
return callback(err);

if (err) {
console.log(err, err.stack);
return callback(err);
}
data.Contents.forEach(function(o) {
var sss = {
url: (options.useSSL ? 'https:' : 'http:') + '//s3.amazonaws.com/' + configs.bucketName + '/' + o.Key
Expand Down
3 changes: 2 additions & 1 deletion lib/transport/local.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*jslint node: true */
var fs = require('fs');
var FileInfo = require('../fileinfo.js');
var lwip = require('lwip');
Expand Down Expand Up @@ -72,7 +73,7 @@ module.exports = function(opts){
},
post:function(fileInfo,file,finish){

var me = this;
var me = this,
options = this.options,
versionFuncs = [];

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"mkdirp": "latest"
},
"devDependencies": {
"jasmine-node": "1.14.2"
"gulp": "^3.8.11",
"gulp-jshint": "^1.9.4",
"jasmine-node": "1.14.2",
"jshint-stylish": "^1.0.1"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 4596788

Please sign in to comment.