mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Update README.md
This commit is contained in:
parent
68b3143a93
commit
7f2315fb1d
@ -62,7 +62,7 @@ This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github
|
|||||||
|
|
||||||
Konva supports UMD loading. So you can use all possible variants to load the framework into your project:
|
Konva supports UMD loading. So you can use all possible variants to load the framework into your project:
|
||||||
|
|
||||||
1 Load Konva via classical `<script>` tag:
|
###1 Load Konva via classical `<script>` tag:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js"></script>
|
<script src="https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js"></script>
|
||||||
@ -70,7 +70,7 @@ Konva supports UMD loading. So you can use all possible variants to load the fra
|
|||||||
|
|
||||||
You can use CDN: [https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js](https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js)
|
You can use CDN: [https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js](https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js)
|
||||||
|
|
||||||
2 Load via AMD (requirejs):
|
###2 Load via AMD (requirejs):
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
define(['./konva'], function(Konva) {
|
define(['./konva'], function(Konva) {
|
||||||
@ -78,7 +78,7 @@ define(['./konva'], function(Konva) {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
3 CommonJS style with npm:
|
###3 CommonJS style with npm:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install konva
|
npm install konva
|
||||||
@ -93,7 +93,7 @@ var Konva = require('konva');
|
|||||||
import Konva from 'konva';
|
import Konva from 'konva';
|
||||||
```
|
```
|
||||||
|
|
||||||
4 Minimal bundle
|
###4 Minimal bundle
|
||||||
|
|
||||||
If you are using webpack or browserfy you can use this approach to load only required Konva's parts:
|
If you are using webpack or browserfy you can use this approach to load only required Konva's parts:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user