Skip to content

Commit 98c0865

Browse files
Merge pull request #3 from LottieFiles/docs/readme-update
docs(readme and deps): updated lottie-player dep version and readme
2 parents 33d1fd5 + d366bfd commit 98c0865

File tree

3 files changed

+3052
-98
lines changed

3 files changed

+3052
-98
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This is a Vue component for the Lottie Web Player. This library is a vue wrapper around the LottieFiles Lottie Web Player
44

55
![screencast](https://github.com/LottieFiles/lottie-vue/blob/master/demo.gif)
6+
67
#### In Javascript or TypeScript:
78

89
1. Install package using npm or yarn.
@@ -22,6 +23,42 @@ import LottieVuePlayer from "@lottiefiles/vue-lottie-player";
2223
Vue.use(LottieVuePlayer);
2324
```
2425

26+
#### With Nuxt:
27+
28+
1. Install package using npm or yarn.
29+
30+
```shell
31+
npm install --save @lottiefiles/vue-lottie-player
32+
```
33+
34+
2. Create a folder called 'plugins' at the root of your project
35+
36+
3. Create a file named 'lottie-vue-player.client.js' inside the 'plugins' directory
37+
38+
4. Inside this file put :
39+
40+
```javascript
41+
42+
import Vue from 'vue';
43+
44+
import LottieVuePlayer from "@lottiefiles/vue-lottie-player";
45+
46+
Vue.use(LottieVuePlayer);
47+
48+
```
49+
50+
5. Add to nuxt.config.js:
51+
52+
```javascript
53+
54+
plugins: [
55+
"~/plugins/lottie-vue-player.client.js"
56+
]
57+
58+
```
59+
60+
---
61+
2562
## Example/Development
2663

2764
1. Clone repo

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
],
2828
"license": "MIT",
2929
"dependencies": {
30-
"@lottiefiles/lottie-player": "^1.0.4",
30+
"@lottiefiles/lottie-player": "^1.5.2",
3131
"vue": "^2.6.12",
3232
"vue-clickaway": "^2.2.2"
3333
},

0 commit comments

Comments
 (0)