Skip to content

Commit

Permalink
Change naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mercs600 committed Oct 28, 2020
1 parent eac43e5 commit 27734e3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 22 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# vue2-perfect-scrollbar
# vue3-perfect-scrollbar
Vue.js minimalistic but powerful wrapper for perfect scrollbar

# Why I Created it ?
Expand All @@ -14,24 +14,32 @@ If you have any reasonable PR you are welcome 🤘
## npm

```sh
npm install vue2-perfect-scrollbar
npm install vue3-perfect-scrollbar
```

## yarn

```sh
yarn add vue2-perfect-scrollbar
yarn add vue3-perfect-scrollbar
```

# How to use

## Global Registration

```js
import PerfectScrollbar from 'vue2-perfect-scrollbar'
import 'vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css'
import { createApp, h } from 'vue'
import PerfectScrollbar from 'vue3-perfect-scrollbar'
import 'vue3-perfect-scrollbar/dist/vue3-perfect-scrollbar.css'

const app = createApp({
render: () => h(App)
})

app.use(Vue3PerfectScrollbar)

app.mount('#app')

Vue.use(PerfectScrollbar)
```

So then you can use this plugin in each component as
Expand Down Expand Up @@ -88,14 +96,14 @@ perfect-scrollbar options.
</div>
</template>
<script>
import { PerfectScrollbar } from 'vue2-perfect-scrollbar'
import { PerfectScrollbar } from 'vue3-perfect-scrollbar'
export default {
components: {
PerfectScrollbar
}
}
</script>
<style src="vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css"/>
<style src="vue3-perfect-scrollbar/dist/vue3-perfect-scrollbar.css"/>
```
[![Edit Vue Template](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/32o7m59xzm)
Expand Down Expand Up @@ -144,7 +152,7 @@ export default {
# DEMO
[https://mercs600.github.io/vue2-perfect-scrollbar/](https://mercs600.github.io/vue2-perfect-scrollbar/). You can also fork example from [codesandbox](https://codesandbox.io/embed/32o7m59xzm)
[https://mercs600.github.io/vue3-perfect-scrollbar/](https://mercs600.github.io/vue3-perfect-scrollbar/). You can also fork example from [codesandbox](https://codesandbox.io/embed/32o7m59xzm)
# Cookbook
Expand All @@ -169,4 +177,4 @@ watch: {
}
```
[![Edit vue2-perfect-scrollbar with router](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vue-routing-example-jbokc?fontsize=14&hidenavigation=1&theme=dark)
[![Edit vue3-perfect-scrollbar with router](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vue-routing-example-jbokc?fontsize=14&hidenavigation=1&theme=dark)
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "vue2-perfect-scrollbar",
"version": "1.5.0",
"name": "vue3-perfect-scrollbar",
"version": "0.0.9",
"description": "Vue.js wrapper for perfect scrollbar",
"paths": {
"source": "src",
"destination": "dist",
"example": "example"
},
"main": "dist/vue2-perfect-scrollbar.cjs.js",
"module": "dist/vue2-perfect-scrollbar.esm.js",
"browser": "dist/vue2-perfect-scrollbar.umd.js",
"style": "dist/vue2-perfect-scrollbar.css",
"types": "./types/vue2-perfect-scrollbar.d.ts",
"main": "dist/vue3-perfect-scrollbar.cjs.js",
"module": "dist/vue3-perfect-scrollbar.esm.js",
"browser": "dist/vue3-perfect-scrollbar.umd.js",
"style": "dist/vue3-perfect-scrollbar.css",
"types": "./types/vue3-perfect-scrollbar.d.ts",
"scripts": {
"build": "rollup -c --environment production",
"build:css": "postcss src/style.css -o dist/vue2-perfect-scrollbar.min.css --env production && postcss src/style.css -o dist/vue2-perfect-scrollbar.css",
"build:css": "postcss src/style.css -o dist/vue3-perfect-scrollbar.min.css --env production && postcss src/style.css -o dist/vue3-perfect-scrollbar.css",
"dev": "webpack-dev-server --config webpack.config.js",
"test": "yarn jest",
"test:dev": "node --inspect-brk node_modules/.bin/jest --runInBand"
},
"repository": {
"type": "git",
"url": "https://github.com/mercs600/vue2-perfect-scrollbar"
"url": "https://github.com/mercs600/vue3-perfect-scrollbar"
},
"author": "Adam Marcinkowski <[email protected]>",
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const browser = {
input: 'src/index.js',
output: {
format: 'umd',
name: 'Vue2PerfectScrollbar',
name: 'Vue3PerfectScrollbar',
file: pkg.browser
},
plugins: [
Expand All @@ -24,8 +24,8 @@ const browserMin = {
input: 'src/index.js',
output: {
format: 'umd',
name: 'Vue2PerfectScrollbar',
file: 'dist/vue2-perfect-scrollbar.umd.min.js'
name: 'Vue3PerfectScrollbar',
file: 'dist/vue3-perfect-scrollbar.umd.min.js'
},
plugins: [
resolve({
Expand Down

0 comments on commit 27734e3

Please sign in to comment.