Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

Commit d2f84a0

Browse files
committed
Further tidy up the README.md
1 parent 0bd65e0 commit d2f84a0

File tree

1 file changed

+31
-20
lines changed

1 file changed

+31
-20
lines changed

README.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,43 @@ A [socket.io](https://socket.io) plugin for Vue.js.
66

77
> **This package does not support native websockets**. At the time, we recommend using [vue-native-websocket](https://github.com/nathantsoi/vue-native-websocket) or [implementing it yourself](https://alligator.io/vuejs/vue-socketio/). For ongoing discussion on this, please visit [#2](https://github.com/icebob/vue-websocket/issues/2).
88
9-
## Install
10-
### NPM
11-
You can install it via [NPM](http://npmjs.org/).
12-
```
13-
$ npm install vue-websocket
9+
## Installation
10+
You can either install this package with `npm`, or manually by downloading the zip file.
11+
12+
### npm
13+
14+
```bash
15+
$ npm install -S vue-websocket
1416
```
17+
1518
### Manual
16-
Download zip package and unpack and add the `vue-websocket.js` file to your project from dist folder.
17-
```
18-
https://github.com/icebob/vue-websocket/archive/master.zip
19-
```
19+
1. Download the latest zip file from [here](https://github.com/icebob/vue-websocket/archive/master.zip).
20+
2. Unzip the file and add the `dist/vue-websocket.js` file to your project.
2021

2122
## Usage
22-
Register the plugin, it will connect to `/`
23+
Register the plugin. By default, it will connect to `/`:
24+
2325
```js
2426
import VueWebsocket from "vue-websocket";
2527
Vue.use(VueWebsocket);
2628
```
27-
or connect to other address:
29+
30+
Or to connect to another address:
31+
2832
```js
2933
Vue.use(VueWebsocket, "ws://otherserver:8080");
3034
```
31-
You can pass options too:
35+
36+
You can also pass options:
37+
3238
```js
3339
Vue.use(VueWebsocket, "ws://otherserver:8080", {
3440
reconnection: false
3541
});
3642
```
3743

44+
To use it in your components:
3845

39-
Use it in your components:
4046
```html
4147
<script>
4248
export default {
@@ -91,25 +97,30 @@ Use it in your components:
9197
</script>
9298
```
9399

94-
## Build
95-
This command will build a distributable version in the `dist` directory.
100+
## Develop
101+
102+
### Building
103+
This command will build a distributable version in the `dist` directory:
104+
96105
```bash
97-
npm run build
106+
$ npm run build
98107
```
99108

100-
## Test
109+
## Testing
110+
This package uses [`karma`](https://www.npmjs.com/package/karma) for testing. You can run the tests like so:
111+
101112
```bash
102-
npm test
113+
$ npm test
103114
```
104115

105116
## Contribution
106117
Please send pull requests improving the usage and fixing bugs, improving documentation and providing better examples, or providing some testing, because these things are important.
107118

108119
## License
109-
vue-websocket is available under the [MIT license](https://tldrlegal.com/license/mit-license).
120+
`vue-websocket` is available under the [MIT license](https://tldrlegal.com/license/mit-license).
110121

111122
## Contact
112123

113-
Copyright (C) 2016 Icebob
124+
Copyright © 2018 Icebob
114125

115126
[![@icebob](https://img.shields.io/badge/github-icebob-green.svg)](https://github.com/icebob) [![@icebob](https://img.shields.io/badge/twitter-Icebobcsi-blue.svg)](https://twitter.com/Icebobcsi)

0 commit comments

Comments
 (0)