some cleanup before moving test client to quasar 1.0

master
David Kebler 2019-08-11 07:26:05 -07:00
parent 2627de964d
commit a5d8785ec0
6 changed files with 17 additions and 55 deletions

View File

@ -1,47 +0,0 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
// 'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
// required to lint *.vue files
plugins: [
// 'vue'
],
globals: {
'ga': true, // Google Analytics
'cordova': true,
'__statics': true
},
// add your custom rules here
'rules': {
// allow async-await
'generator-star-spacing': 'off',
// allow paren-less arrow functions
'arrow-parens': 0,
'one-var': 0,
'import/first': 0,
'import/named': 2,
'import/namespace': 2,
'import/default': 2,
'import/export': 2,
'import/extensions': 0,
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/syncd/ /syncd/
*.log *.log
/temp/ /temp/
/archive/

View File

@ -3,3 +3,4 @@ test/
*.test.js *.test.js
testing/ testing/
test-client test-client
archive/

View File

@ -71,13 +71,12 @@ class WSConsumer extends EventEmitter {
function open () { function open () {
this.listen() // this handles messages this.listen() // this handles messages
console.log(`socket open to server at : ${this.url}`) // console.log(`socket open to server at : ${this.url}`)
if (!this.started) this.emit('connected') if (!this.started) this.emit('connected')
else this.emit('reconnected') else this.emit('reconnected')
clearTimeout(timeout) clearTimeout(timeout)
// this.socket.onerror = error.bind(this) // this.socket.onerror = error.bind(this)
this.socket.onclose = close.bind(this) this.socket.onclose = close.bind(this)
console.log(this.socket)
count = 0 count = 0
this.started = true this.started = true
resolve({url:this.url, msg:`socket open to server at : ${this.url}`}) resolve({url:this.url, msg:`socket open to server at : ${this.url}`})
@ -112,9 +111,7 @@ class WSConsumer extends EventEmitter {
let res = await this._packetProcess(packet) let res = await this._packetProcess(packet)
if (!res) { if (!res) {
// if process was not promise returning like just logged to console // if process was not promise returning like just logged to console
console.log( // console.log('warning: consumer process function was not promise returning')
'warning: consumer process function was not promise returning'
)
} }
}) })
@ -167,9 +164,7 @@ class WSConsumer extends EventEmitter {
if (!res) { if (!res) {
// if process was not promise returning like just logged to console // if process was not promise returning like just logged to console
res = reply res = reply
console.log( // console.log('consumer function was not promise returning - resolving unprocessed')
'consumer function was not promise returning - resolving unprocessed'
)
} }
resolve(res) resolve(res)
}) // end reply listener }) // end reply listener

View File

@ -8,6 +8,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"lint": "eslint --ext .js,.vue src", "lint": "eslint --ext .js,.vue src",
"tcw": "WSS='ws://pine64.kebler.net:8090' quasar dev",
"tc": "quasar dev" "tc": "quasar dev"
}, },
"dependencies": { "dependencies": {

View File

@ -14,6 +14,17 @@ module.exports = function (ctx) {
], ],
supportIE: false, supportIE: false,
build: { build: {
env: ctx.dev
// pass environment variable to browser client
? { // so on dev we'll have
DBURL: JSON.stringify(process.env.DBURL),
// DBURL: JSON.stringify('ws://192.168.0.231:3030'),
WSS: JSON.stringify(process.env.WSS)
}
: { // and on build (production):
DBURL: JSON.stringify('ws://192.168.0.231:3030'),
WSS: JSON.stringify('ws://relays2.kebler.net:8090')
},
scopeHoisting: true, scopeHoisting: true,
vueRouterMode: 'history', vueRouterMode: 'history',
// vueCompiler: true, // vueCompiler: true,