diff --git a/.all-contributorsrc b/.all-contributorsrc
index 6c4ee18..db3ccb2 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -307,6 +307,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "deanshub",
+ "name": "Dean Shub",
+ "avatar_url": "https://avatars2.githubusercontent.com/u/2688676?v=4",
+ "profile": "https://github.com/deanshub",
+ "contributions": [
+ "code"
+ ]
}
],
"contributorsPerLine": 7
diff --git a/README.md b/README.md
index a6a2cad..bdb8e5c 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-[![All Contributors](https://img.shields.io/badge/all_contributors-33-orange.svg?style=flat-square)](#contributors-)
+[![All Contributors](https://img.shields.io/badge/all_contributors-34-orange.svg?style=flat-square)](#contributors-)
@@ -158,10 +158,11 @@ Thanks goes to these wonderful people
Farhan Khan 💻 |
Jurre Vriesen 💻 |
James Turnbull 💻 |
+ Dean Shub 💻 |
-
+
diff --git a/docs/README.md b/docs/README.md
index 5c664fb..c2b785f 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -20,15 +20,19 @@ WeTTy is event driven. To Spawn a new server call `wetty.start()` with no
arguments.
```javascript
-const wetty = require('wetty.js');
-
-wetty
- .on('exit', ({ code, msg }) => {
- console.log(`Exit with code: ${code} ${msg}`);
+import { start } from 'wetty';
+
+start(/* server settings, see Options */)
+ .then((wetty) => {
+ console.log('server running');
+ wetty
+ .on('exit', ({ code, msg }) => {
+ console.log(`Exit with code: ${code} ${msg}`);
+ })
+ .on('spawn', (msg) => console.log(msg));
+ /* code you want to execute */
})
- .on('spawn', msg => console.log(msg));
-wetty.start(/* server settings, see Options */).then(() => {
- console.log('server running');
- /* code you want to execute */
-});
+ .catch((err) => {
+ console.error(err);
+ });
```
diff --git a/package.json b/package.json
index 3202ca1..e0739c9 100644
--- a/package.json
+++ b/package.json
@@ -158,7 +158,7 @@
"sinon": "^7.5.0",
"snowpack": "^2.10.1",
"ts-node": "^9.0.0",
- "typescript": "^4.0.2"
+ "typescript": "^4.0.3"
},
"contributors": [
"Krishna Srinivas ",
diff --git a/yarn.lock b/yarn.lock
index 549b297..563a7e5 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5514,10 +5514,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"
-typescript@^4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
- integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
+typescript@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
+ integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==
undefsafe@^2.0.2:
version "2.0.3"