From ca629a3178ce4c4a6438ae837a75ad3934c89a7a Mon Sep 17 00:00:00 2001 From: Alexander Burkov Date: Fri, 3 Dec 2021 18:11:13 +0300 Subject: [PATCH] update README | add keywords in package.json --- README.md | 68 +++++++++++++++++++++++++++++++++++++-------- package.json | 5 ++++ src/v-snow/index.ts | 4 +-- 3 files changed, 64 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0b22035..1c76bf8 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,64 @@ -# v-snow +# V-Snow -> A Vue.js project +[![Vue2](https://img.shields.io/badge/Vue-2.x-brightgreen.svg?style=for-the-badge)](https://vuejs.org/) +[![npm](https://img.shields.io/npm/v/vsnow?style=for-the-badge)](https://www.npmjs.com/package/vsnow) +[![npm](https://img.shields.io/npm/dw/vsnow?style=for-the-badge)](https://www.npmjs.com/package/vsnow) -## Build Setup +Snowfall effect plugin for Vue js -```bash -# install dependencies -npm install +> ## 👀 Demo -# serve with hot reload at localhost:8080 -npm run dev +You can play with params on +[DEMO PAGE](http://gamazu.github.io/v-snow) -# build for production with minification -npm run build +> ## 💾 Instalation + +This version requires Vue 2.X. + +```sh +npm install vsnow +``` + +## Initialization + +### ES2015 (Webpack/Rollup/Browserify/etc) + +```javascript +import Vue from "vue"; +import VSnow from "vsnow"; + +Vue.use(VSnow); +// Or as a directive-only +import { VSnowDirective } from "vsnow"; +Vue.directive("v-snow", VSnowDirective); +// Or only as a component +import { VSnowContainer } from "vsnow"; +Vue.filter("VSnow", VSnowContainer); ``` -For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader). +### UMD (Browser) + +```html + + + +``` + +## 🚀 Usage + +```html + +
+ +
+ + + +``` + +`That's all 🤩` + +## ⚙️ Configuration diff --git a/package.json b/package.json index b2f05cd..20b9540 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,11 @@ "typings": "dist/types/v-snow/index.d.ts", "version": "1.0.33", "author": "Alexander Burkov ", + "keywords": [ + "snow", + "snowfall", + "vue" + ], "repository": { "type": "git", "url": "https://github.com/gamazu/v-snow" diff --git a/src/v-snow/index.ts b/src/v-snow/index.ts index 7468742..b7e9513 100644 --- a/src/v-snow/index.ts +++ b/src/v-snow/index.ts @@ -21,13 +21,13 @@ export const directive = statefulDirective(); const plugin: PluginObject = { install(Vue) { Vue.directive("snow", directive); - Vue.component("VueSnow", component); + Vue.component("VSnow", component); } }; // auto install if (typeof window !== "undefined" && window.Vue) { - plugin.install(window.Vue, {}); + plugin.install(window.Vue); (window as any).vsnow = plugin; }