From 367849059d27e9329723abe544bd6b4081381eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aper=C3=A7u?= Date: Mon, 16 Feb 2015 21:03:24 +0100 Subject: [PATCH] fix(control): pass jshint when scaffolding using sockets --- app/templates/{#.jshintrc => .jshintrc} | 3 ++- .../client/services/socket(sockets)/socket.service.js | 2 +- app/templates/server/config/sockets(sockets).js | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) rename app/templates/{#.jshintrc => .jshintrc} (89%) diff --git a/app/templates/#.jshintrc b/app/templates/.jshintrc similarity index 89% rename from app/templates/#.jshintrc rename to app/templates/.jshintrc index 2166f80..28f1fe4 100644 --- a/app/templates/#.jshintrc +++ b/app/templates/.jshintrc @@ -36,6 +36,7 @@ "expect": true, "afterEach": true, "alert": true, - "beforeEach": true + "beforeEach": true<% if (filters.sockets) { %>, + "io" : true<% } %> } } diff --git a/app/templates/client/services/socket(sockets)/socket.service.js b/app/templates/client/services/socket(sockets)/socket.service.js index fa698b3..4387273 100644 --- a/app/templates/client/services/socket(sockets)/socket.service.js +++ b/app/templates/client/services/socket(sockets)/socket.service.js @@ -32,7 +32,7 @@ angular.module('<%= appname %>') if (index !== -1) { items.splice(index, 1); } - }) + }); }, unsyncModel: function (model) { diff --git a/app/templates/server/config/sockets(sockets).js b/app/templates/server/config/sockets(sockets).js index e2764b3..173b4a6 100644 --- a/app/templates/server/config/sockets(sockets).js +++ b/app/templates/server/config/sockets(sockets).js @@ -1,7 +1,5 @@ 'use strict'; -var config = require('./environment'); - module.exports = function (io) { io.on('connection', function (socket) { @@ -15,7 +13,7 @@ module.exports = function (io) { console.log('[%s] %s disconnected.', new Date().toUTCString(), socket.ip); }); - console.log('[%s] %s connected.', socket.connectDate.toUTCString(), socket.ip); + console.log('[%s] %s logged.', socket.connectDate.toUTCString(), socket.ip); });