Skip to content

Commit

Permalink
fix travis.yml and eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aclave1 committed Jun 28, 2016
1 parent ae9a7e0 commit 651fc25
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: node_js
node_js:
- '4'
- stable
- 4
- 5
- 6

notifications:
email: false
Expand All @@ -19,4 +20,4 @@ deploy:
on:
tags: true
repo: trailsjs/trailpack-realtime
node: stable
node: 6
5 changes: 5 additions & 0 deletions config/sockets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
authorization: null,
pathname: '/primus',
transformer: 'engine.io'
}
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict'
const Trailpack = require('trailpack')
const Primus = require('primus');
const _ = require('lodash');
const Primus = require('primus')
const _ = require('lodash')

const primusDefaults = {
transformer:'engine.io'
};
transformer: 'engine.io'
}

module.exports = class Realtime extends Trailpack {
validate () {
Expand All @@ -19,7 +19,7 @@ module.exports = class Realtime extends Trailpack {
initialize () {
return new Promise((res,rej)=>{
this.app.once('webserver:http:ready',(httpServer)=>{
const primusConfig = _.get(this.app.config,'realtime.primus',{options:{}})
const primusConfig = _.get(this.app.config,'realtime.primus',{options: {}})
this.app.sockets = new Primus(httpServer,Object.assign(primusDefaults,primusConfig.options))
res()
})
Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,17 @@
"trailjs"
],
"dependencies": {
"bluebird": "^3.1.1",
"engine.io": "^1.6.7",
"primus": "^4.0.4",
"trailpack": "latest"
"trailpack": "^1.0.4"
},
"devDependencies": {
"eslint-config-trails": "latest",
"eslint": "^1.10",
"eslint": "^2.13.1",
"eslint-config-trails": "^1.0.7",
"mocha": "^2.3"
},
"bundledDependencies": [
"trailpack"
],
"scripts": {
"test": "eslint . && mocha"
"test": "eslint ."
},
"engines": {
"node": ">= 4.0.0"
Expand Down

0 comments on commit 651fc25

Please sign in to comment.