File tree Expand file tree Collapse file tree 2 files changed +38
-2
lines changed Expand file tree Collapse file tree 2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ Enjoy :smile:
37
37
- [ Props data structure] ( #props-data-structure )
38
38
- [ Events API] ( #events-api )
39
39
- [ Using with Firestore] ( #using-with-firestore )
40
+ - [ Use as a Web Component] ( #use-as-a-web-component )
40
41
41
42
## Installation
42
43
@@ -462,6 +463,41 @@ messages: {
462
463
}
463
464
```
464
465
466
+ ## Use as a Web Component
467
+
468
+ ### Clone vue-advance-chat project
469
+
470
+ ``` bash
471
+ git clone https://github.com/antoine92190/vue-advanced-chat.git
472
+ ```
473
+
474
+ ### Build it as a Web Component
475
+
476
+ ``` bash
477
+ npm i && npm run build:wc
478
+ ```
479
+
480
+ ### Add Vue.js to your application
481
+
482
+ ``` html
483
+ <!-- index.html -->
484
+ <script src =" https://unpkg.com/vue" ></script >
485
+ ```
486
+
487
+ ### Import the built minified component in your application
488
+
489
+ #### Add vue-advanced-chat.min.js in your application files
490
+
491
+ ```
492
+ vue-advance-chat/dist/vue-advanced-chat.min.js
493
+ ```
494
+
495
+ #### Import the vue-advanced-chat.min.js file you just added
496
+
497
+ ``` javascript
498
+ import ' ./vue-advanced-chat.min.js'
499
+ ```
500
+
465
501
## License
466
502
467
503
This project is licensed under [ MIT License] ( http://en.wikipedia.org/wiki/MIT_License )
Original file line number Diff line number Diff line change 26
26
"serve" : " vue-cli-service serve" ,
27
27
"build" : " vue-cli-service build" ,
28
28
"build:lib" : " vue-cli-service build --target lib --name vue-advanced-chat ./src/ChatWindow/index.js" ,
29
- "build:wc" : " vue-cli-service build --target wc --name vue-advanced-chat ./src/ChatWindow/index.js " ,
29
+ "build:wc" : " vue-cli-service build --target wc --name vue-advanced-chat ./src/ChatWindow/ChatWindow.vue " ,
30
30
"prepublish" : " npm run build:lib" ,
31
31
"publish-beta" : " npm publish --tag beta" ,
32
32
"lint" : " vue-cli-service lint"
48
48
"node-sass" : " ^4.13.0" ,
49
49
"sass" : " ^1.19.0" ,
50
50
"sass-loader" : " ^8.0.0" ,
51
- "vue-template-compiler" : " ^2.6.10 " ,
51
+ "vue-template-compiler" : " ^2.6.11 " ,
52
52
"vue" : " ^2.6.10"
53
53
},
54
54
"dependencies" : {
You can’t perform that action at this time.
0 commit comments