You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-14Lines changed: 35 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ You can find the source code of examples under `examples` branch.
30
30
**Before using the plugin & components, here's something you should know :**
31
31
32
32
* It's based on [**vue-rx**](https://github.com/vuejs/vue-rx).
33
-
*Use vuejs-clipper plugin also add **vue-rx** plugin to vue.
33
+
*[**rxjs**](https://github.com/ReactiveX/rxjs/tree/6.x) and [**vue-rx**](https://github.com/vuejs/vue-rx) are required as peer dependencies.
34
34
* Components are responsive base on **width** instead of height, see [Component Layout](https://github.com/timtnleeProject/vuejs-clipper/wiki/Component-layout).
35
35
* You can clip your own images (local uploaded images or images served on your site), but you cannot clip a cross-origin image unless the image server set the CORS headers.
36
36
* Components' **input** is an image URL, **output** is a canvas element, they only help you clip images to canvas, you need to handle other things like *transform file input to image URL* or *transform output canvas to image* by yourself.
@@ -39,16 +39,31 @@ You can find the source code of examples under `examples` branch.
39
39
40
40
### NPM & ESM
41
41
42
-
install vuejs-clipper
42
+
Install vuejs-clipper
43
43
44
44
```bash
45
-
$npm install vuejs-clipper --save
45
+
npm install vuejs-clipper --save
46
46
```
47
47
48
-
need css loader, ex: `sass-loader`, if you haven't installed :
48
+
Install peer dependencies if you haven't.
49
49
50
50
```bash
51
-
$npm install -D sass-loader node-sass
51
+
npm install vue-rx rxjs --save
52
+
```
53
+
54
+
Need css loader, ex: `sass-loader`, if you haven't installed :
55
+
56
+
```bash
57
+
npm install -D sass-loader node-sass
58
+
```
59
+
60
+
Vuejs-clipper is based on **vue-rx**, so make sure you have vue-rx plugin installed.
61
+
62
+
```javascript
63
+
importVuefrom'vue'
64
+
importVueRxfrom'vue-rx'
65
+
// install vue-rx
66
+
Vue.use(VueRx)
52
67
```
53
68
54
69
#### (1) use vuejs-clipper plugin
@@ -59,8 +74,11 @@ By default it will register **all components** to Vue global scope.
0 commit comments