Skip to content

Commit

Permalink
Bump version to 1.0.7..
Browse files Browse the repository at this point in the history
  • Loading branch information
ya332 committed Jun 20, 2021
1 parent 6a5b33c commit e75da57
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env node
'use strict'
var argv = require('./src/argv')
const WebSocket = require('ws');
var opts = {
host: argv.host || 'sharktail.herokuapp.com',
port: argv.port || 2390,
delay: argv.delay || null
}
host: argv.host,
port: argv.port
}
console.log(opts)

const mySocket = new WebSocket(`ws://${opts.host}:${opts.port}`);
mySocket.onopen = event => console.log('open')
Expand Down
9 changes: 7 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sharktail",
"version": "1.0.6",
"version": "1.0.7",
"description": "Official Sharktail CLI written in Node.js",
"main": "index.js",
"preferGlobal": true,
Expand All @@ -21,10 +21,16 @@
"engines": {
"node": ">=4.8.0"
},
"keywords": ["stream terminal","share terminal","monitor","sharktail"],
"keywords": [
"stream terminal",
"share terminal",
"monitor",
"sharktail"
],
"author": "Yigit Alparslan (ya332)",
"license": "MIT",
"dependencies": {
"yargs": "^17.0.1"
"yargs": "^17.0.1",
"ws": "^7.4.5"
}
}
10 changes: 6 additions & 4 deletions src/argv.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
var argv = require('yargs')
.usage('Usage: echo "hello" | sharktail')
.help('help')
.alias('help', 'h')
.option('host', {
alias: 'h',
demand: false,
describe: 'custom host (default sharktail.herokuapp.com)',
type: 'string'
type: 'string',
default: 'sharktail.herokuapp.com'
})
.option('port', {
alias: 'p',
demand: false,
describe: 'custom port (default 2390)',
type: 'number'
type: 'number',
default: 2390
})
.example('echo "hello" | sharktail')
.example('echo "hello" | sharktail --host myHost.io --port 1337')
.epilogue('@Author: Yigit Alparslan - github.com/ya332/sharktail-cli - @Copyright 2021')
.example('echo "hello" | sharktail --host 127.0.0.1 --port 2390')
.epilogue('@Author: Yigit Alparslan - github.com/ya332/sharktail - @Copyright 2021')
.argv

module.exports = argv

0 comments on commit e75da57

Please sign in to comment.