Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Fixing jshint issues with grunt, gulp, and reset-password script.
Browse files Browse the repository at this point in the history
  • Loading branch information
jloveland committed Oct 29, 2015
1 parent afd93b4 commit 1f79770
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module.exports = function (grunt) {
rename: function (base, src) {
return src.replace('/scss/', '/css/');
}
}]
}]
}
},
less: {
Expand All @@ -159,7 +159,7 @@ module.exports = function (grunt) {
rename: function (base, src) {
return src.replace('/less/', '/css/');
}
}]
}]
}
},
'node-inspector': {
Expand Down
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ var _ = require('lodash'),
}),
path = require('path'),
endOfLine = require('os').EOL,
protractor = require("gulp-protractor").protractor,
webdriver_update = require("gulp-protractor").webdriver_update,
webdriver_standalone = require("gulp-protractor").webdriver_standalone;
protractor = require('gulp-protractor').protractor,
webdriver_update = require('gulp-protractor').webdriver_update,
webdriver_standalone = require('gulp-protractor').webdriver_standalone;

// Set NODE_ENV to 'test'
gulp.task('env:test', function () {
Expand Down
8 changes: 5 additions & 3 deletions scripts/reset-password.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

var nodemailer = require('nodemailer'),
mongoose = require('mongoose'),
chalk = require('chalk'),
Expand Down Expand Up @@ -47,7 +49,7 @@ mg.connect(function (db) {
email.text = email.html = text.replace('{{name}}', user.displayName);

transporter.sendMail(email, emailCallback(user));
};
}

function emailCallback(user) {
return function (err, info) {
Expand All @@ -68,7 +70,7 @@ mg.connect(function (db) {
return reportAndExit(processedCount, errorCount);
}
};
};
}

// report the processing results and exit
function reportAndExit(processedCount, errorCount) {
Expand All @@ -79,7 +81,7 @@ mg.connect(function (db) {
if (processedCount === 0) {
console.log(chalk.yellow('No users were found.'));
} else {
var alert = (!errorCount) ? chalk.green : ((successCount / processedCount) < .8) ? chalk.red : chalk.yellow;
var alert = (!errorCount) ? chalk.green : ((successCount / processedCount) < 0.8) ? chalk.red : chalk.yellow;

console.log(alert('Sent ' + successCount + ' of ' + processedCount + ' emails successfully.'));
}
Expand Down

0 comments on commit 1f79770

Please sign in to comment.