diff --git a/README.md b/README.md index 2eb11fa..2ada46a 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,13 @@ You can find a few examples and the documentation [here](https://eliep.github.io `npm install vue-avatar` ## Usage +vue-avatar is a UMD module, which can be used as a module in both CommonJS and AMD modular environments. +When in non-modular environment, Avatar will be registered as a global variable.
### ES6 ```js -import Avatar from 'vue-avatar' +import Avatar from 'vue-avatar/dist/Avatar' export default { ... @@ -41,9 +43,35 @@ After that, you can use it in your templates: ``` ### ES5 +```js +var Vue = require('vue') +var Avatar = require('vue-avatar') + +var YourComponent = Vue.extend({ + ... + components: { + 'avatar': Avatar.Avatar + }, + ... +}) +``` ### Browser +``` + + + +new Vue({ + ... + components: { + 'avatar': Avatar.Avatar + }, + ... +}) +``` + + ## Props