Skip to content

Commit a9501c2

Browse files
committed
(docs) update installation steps
1 parent 76f3eae commit a9501c2

File tree

1 file changed

+4
-76
lines changed

1 file changed

+4
-76
lines changed

README.md

Lines changed: 4 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ You will get a fully working chat application for web and mobile:
7070

7171
## Installation
7272

73-
This component is only compatible with Vue `2.6.14` and above.
74-
7573
```bash
7674
# Using npm
7775
npm install --save vue-advanced-chat
@@ -80,14 +78,7 @@ npm install --save vue-advanced-chat
8078
yarn add vue-advanced-chat
8179

8280
# Using CDN
83-
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
84-
<script src="https://cdn.jsdelivr.net/npm/vue-advanced-chat@0.8.8/dist/vue-advanced-chat.min.js"></script>
85-
```
86-
87-
If you want to send mp3 audio messages, you may need to install `lamejs` inside your project:
88-
89-
```bash
90-
npm install lamejs --save
81+
<script src="https://cdn.jsdelivr.net/npm/vue-advanced-chat@2.0.0/dist/vue-advanced-chat.es.js"></script>
9182
```
9283

9384
[Installation with React & Angular](#use-as-a-web-component-with-react-and-angular)
@@ -101,9 +92,9 @@ npm install lamejs --save
10192
<vue-advanced-chat
10293
ref="chatWindow"
10394
:current-user-id="currentUserId"
104-
:rooms="rooms"
105-
:messages="messages"
106-
.room-actions="roomActions"
95+
:rooms="JSON.stringify(rooms)"
96+
:messages="JSON.stringify(messages)"
97+
:room-actions="JSON.stringify(roomActions)"
10798
/>
10899
</template>
109100

@@ -896,16 +887,6 @@ messages: {
896887

897888
- Follow [Installation](#installation) steps
898889

899-
### Install Vue.js
900-
901-
```bash
902-
# Using npm
903-
npm install --save vue
904-
905-
# Using yarn
906-
yarn add --save vue
907-
```
908-
909890
### React Setup
910891

911892
See demo repository: https://github.com/antoine92190/vue-advanced-chat-sandbox/tree/react
@@ -914,59 +895,6 @@ See demo repository: https://github.com/antoine92190/vue-advanced-chat-sandbox/t
914895

915896
See demo repository: https://github.com/antoine92190/vue-advanced-chat-sandbox/tree/angular
916897

917-
```jsonc
918-
// angular.json
919-
920-
"build": {
921-
"scripts": [
922-
"./node_modules/vue/dist/vue.min.js",
923-
"./node_modules/vue-advanced-chat/dist/vue-advanced-chat.min.js"
924-
]
925-
}
926-
```
927-
928-
```javascript
929-
// page.module.ts
930-
931-
@NgModule({
932-
...
933-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
934-
})
935-
```
936-
937-
```html
938-
<!-- page.html -->
939-
940-
<vue-advanced-chat
941-
height="100vh"
942-
[currentUserId]="currentUserId"
943-
[roomId]="roomId"
944-
[rooms]="rooms"
945-
[roomsLoaded]="true"
946-
[messages]="messages"
947-
[messagesLoaded]="messagesLoaded"
948-
[showFiles]="true"
949-
[showEmojis]="true"
950-
[showReactionEmojis]="true"
951-
[showFooter]="true"
952-
(fetch-messages)="fetchMessages($event.detail[0])"
953-
(send-message)="sendMessage($event.detail[0])"
954-
...
955-
>
956-
</vue-advanced-chat>
957-
```
958-
959-
<br>
960-
961-
## Use in a Vue 3 project
962-
963-
### Install vue-advance-chat component (next branch)
964-
965-
```bash
966-
# Using npm
967-
npm install --save https://github.com/antoine92190/vue-advanced-chat/tarball/next
968-
```
969-
970898
<br>
971899

972900
## [Contributing](https://github.com/antoine92190/vue-advanced-chat/blob/master/.github/CONTRIBUTING.md)

0 commit comments

Comments
 (0)