Skip to content

Commit 4be8986

Browse files
leorauchg
authored andcommitted
Important bug fixes (rauchg#208)
* Update args * Updated docs * Correct build output dir * Fix usage information option * We need babel-register * Adjust documentation for improved option names
1 parent c54b678 commit 4be8986

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Usage: slackin [options] <team-id> <api-token>
5656
5757
Options:
5858
59-
-h, --help output usage information
60-
-V, --version output the version number
59+
-?, --help output usage information
60+
-v, --version output the version number
6161
-p, --port <port> Port to listen on [$PORT or 3000]
6262
-h, --hostname <hostname> Hostname to listen on [$HOSTNAME or 0.0.0.0]
6363
-c, --channels [<chan>] One or more comma-separated channel names to allow single-channel guests [$SLACK_CHANNELS]

bin/slackin

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var pkg = require('./../package');
44
var args = require('args');
5-
var slackin = require('./../node').default;
5+
var slackin = require('./../dist').default;
66

77
args
88
.option(['p', 'port'], 'Port to listen on [$PORT or 3000]', require('hostenv').PORT || process.env.PORT || 3000)
@@ -12,15 +12,21 @@ args
1212
.option(['P', 'path'], 'Path to serve slackin under', '/')
1313
.option(['s', 'silent'], 'Do not print out warns or errors')
1414
.option(['C', 'coc'], 'Full URL to a CoC that needs to be agreed to')
15-
.option(['S', 'css'], 'Full URL to a custom CSS file to use on the main page');
15+
.option(['S', 'css'], 'Full URL to a custom CSS file to use on the main page')
16+
.option(['?', 'help'], 'Show the usage information');
1617

1718
var flags = args.parse(process.argv, {
18-
value: '<team-id> <api-token>'
19+
value: '<team-id> <api-token>',
20+
help: false
1921
});
2022

2123
var org = args.sub[0] || process.env.SLACK_SUBDOMAIN;
2224
var token = args.sub[1] || process.env.SLACK_API_TOKEN;
2325

26+
if (flags.help) {
27+
args.showHelp();
28+
}
29+
2430
if (!org || !token) {
2531
args.showHelp();
2632
} else {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
]
1010
},
1111
"dependencies": {
12-
"args": "1.2.1",
12+
"args": "1.3.0",
1313
"babel-core": "6.3.26",
1414
"babel-polyfill": "6.3.14",
1515
"babel-preset-es2015": "6.3.13",
@@ -29,6 +29,7 @@
2929
"license": "MIT",
3030
"devDependencies": {
3131
"babel-eslint": "6.0.4",
32+
"babel-register": "6.9.0",
3233
"eslint": "2.12.0",
3334
"eslint-config-default": "0.2.0",
3435
"mocha": "2.2.4",

0 commit comments

Comments
 (0)