Skip to content

Commit

Permalink
update README | add keywords in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
aaburkov committed Dec 3, 2021
1 parent 8cd4c1f commit ca629a3
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 13 deletions.
68 changes: 57 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vsnow/dist/vsnow.min.js"></script>
<script>
// As a plugin
Vue.use(vsnow.VueMaskPlugin);
</script>
```

## 🚀 Usage

```html
<!-- As a directive -->
<div v-snow>
<!-- content -->
</div>

<!-- As a wrapper componente -->
<VSnow />
```

`That's all 🤩`

## ⚙️ Configuration
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"typings": "dist/types/v-snow/index.d.ts",
"version": "1.0.33",
"author": "Alexander Burkov <[email protected]>",
"keywords": [
"snow",
"snowfall",
"vue"
],
"repository": {
"type": "git",
"url": "https://github.com/gamazu/v-snow"
Expand Down
4 changes: 2 additions & 2 deletions src/v-snow/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export const directive = statefulDirective();
const plugin: PluginObject<any> = {
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;
}

Expand Down

0 comments on commit ca629a3

Please sign in to comment.