Skip to content

Commit

Permalink
update all dependecies and refactor code for updating
Browse files Browse the repository at this point in the history
  • Loading branch information
hengkiardo committed Aug 19, 2014
1 parent e350f8e commit 8cc3926
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 45 deletions.
4 changes: 3 additions & 1 deletion Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ module.exports = (grunt) ->

config = require(__dirname + "/app/config/config")

require('time-grunt') grunt

###
Dynamically load npm tasks
###
require("load-grunt-tasks") grunt
require('jit-grunt') grunt

grunt.initConfig

Expand Down
5 changes: 3 additions & 2 deletions app/config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ module.exports = function (app, express, passport) {
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: true
}));
}));

app.use(expressValidator());
app.use(methodOverride());

Expand Down Expand Up @@ -99,7 +100,7 @@ module.exports = function (app, express, passport) {

// will print stacktrace
if (app.get('env') === 'development') {
app.use(responseTime());
app.use(responseTime(5));
} else {
app.use(compression({
filter: function (req, res) { return /json|text|javascript|css/.test(res.getHeader('Content-Type')) },
Expand Down
24 changes: 12 additions & 12 deletions app/helper/mailer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
var _ = require('lodash');
var path = require('path');
var config = require('../config/config')
var templatesDir = path.resolve(config.root + '/app/views/mailer');
var nodemailer = require('nodemailer');
var emailTemplates = require('email-templates');
var _ = require('lodash')
var path = require('path')
var config = require('../config/config')
var templatesDir = path.resolve(config.root + '/app/views/mailer')
var nodemailer = require('nodemailer')
var emailTemplates = require('email-templates')

var transport = nodemailer.createTransport("SMTP", {
var transport = nodemailer.createTransport({
service: 'Mailgun',
auth: {
user: config.mailgun.user,
Expand All @@ -16,14 +16,14 @@ var transport = nodemailer.createTransport("SMTP", {
exports.sendOne = function(temp, subject, obj, fn) {
emailTemplates(templatesDir, function(err, template) {
if (err) {
console.log(err);
console.log(err)
} else {

var locals = obj;
var locals = obj

template(temp, locals, function(err, html, text) {
if (err) {
console.log(err);
console.log(err)
} else {

transport.sendMail({
Expand All @@ -35,9 +35,9 @@ exports.sendOne = function(temp, subject, obj, fn) {
text: text
}, function(err, responseStatus) {
if (err) {
console.log(err);
console.log(err)
} else {
return fn(null, responseStatus.message, html, text);
return fn(null, responseStatus.message, html, text)
}
});

Expand Down
62 changes: 32 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,48 +28,49 @@
"url": "https://github.com/aredo/express4-bootstrap-starter.git"
},
"dependencies": {
"express": "^4.3.1",
"response-time": "^1.0.0",
"morgan": "^1.1.1",
"body-parser": "^1.2.1",
"express": "^4.8.*",
"response-time": "^2.0.*",
"morgan": "^1.2.*",
"body-parser": "^1.6.5",
"cookie-parser": "latest",
"compression": "^1.0.2",
"serve-favicon": "^2.0.0",
"method-override": "^1.0.2",
"mongoose": "3.8.9",
"errorhandler": "^1.0.1",
"jade": "^1.3.1",
"compression": "^1.0.11",
"serve-favicon": "^2.0.1",
"method-override": "^2.1.3",
"mongoose": "3.8.15",
"errorhandler": "^1.1.1",
"jade": "^1.5.0",
"passport": "^0.2.0",
"passport-local": "^1.0.0",
"passport-twitter": "^1.0.2",
"passport-facebook": "^1.0.3",
"view-helpers": "^0.1.4",
"view-helpers": "^0.1.5",
"async": "^0.9.0",
"winston": "^0.7.3",
"express-session": "^1.2.0",
"statuses": "^1.0.2",
"express-session": "^1.7.6",
"statuses": "^1.0.3",
"express-flash": "0.0.2",
"lodash": "^2.4.1",
"connect-mongo": "^0.4.1",
"multer": "0.0.7",
"mongoose-timestamp": "^0.2.1",
"utility": "^0.1.13",
"multer": "0.1.4",
"mongoose-timestamp": "^0.3.0",
"utility": "^1.0.0",
"mongoose-types": "^1.0.3",
"mongoose-error-helper": "0.0.2",
"url-to-screenshot": "^0.4.1",
"mongoose-slug": "^1.3.0",
"express-validator": "^2.1.2",
"request": "^2.36.0",
"phantom-render-stream": "^0.6.0",
"validator": "^3.12.0",
"moment": "^2.6.0",
"express-validator": "^2.3.0",
"request": "^2.40.0",
"phantom-render-stream": "^1.0.3",
"validator": "^3.17.0",
"moment": "^2.8.1",
"multipart": "^0.1.5",
"cheerio": "^0.16.0",
"email-templates": "^1.0.0",
"nodemailer": "^0.6.5"
"cheerio": "^0.17.0",
"email-templates": "^1.1.1",
"nodemailer": "^1.2.0",
"ejs": "^1.0.0"
},
"devDependencies": {
"mocha": "^1.19.0",
"mocha": "^1.21.4",
"chai": "^1.9.1",
"supertest": "^0.13.0",
"colors": "^0.6.2",
Expand All @@ -80,12 +81,13 @@
"grunt-concurrent": "latest",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "*",
"grunt-contrib-concat": "^0.4.0",
"grunt-contrib-clean": "^0.5.0",
"load-grunt-tasks": "^0.4.0",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-csslint": "^0.2.0",
"grunt-contrib-cssmin": "^0.9.0",
"grunt-contrib-less": "^0.11.0"
"grunt-contrib-cssmin": "^0.10.0",
"grunt-contrib-less": "^0.11.4",
"time-grunt": "^0.4.0",
"jit-grunt": "^0.8.0"
}
}

0 comments on commit 8cc3926

Please sign in to comment.