Skip to content

Commit db9ae20

Browse files
author
Bartosz Dominiak
committed
Merge branch 'master' into next
2 parents d6ddf86 + bc0c151 commit db9ae20

34 files changed

+447
-270
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
## [0.6.1] - 2020-09-24
9+
### Updated
10+
- Yarn lock file
11+
12+
## [0.6.0] - 2020-09-24
13+
### Removed
14+
- Removed maximum node version range (#41)
15+
- Node version max range (#41)
16+
17+
### Added
18+
- Added dynamic tag support (#41)
19+
- Added i18n support with proper validation (#41)
20+
- Reset list-style CSS (#41)
21+
22+
## [0.5.2] - 2020-09-21
23+
### Updated
24+
- Rollup configs
25+
- Vue@2 and Vue@3 examples
26+
- Docs
27+
- Dependencies
28+
- TravisCI Config (Auto-deploy only Vue@2 version)
829

930
## [0.5.1] - 2020-09-17
1031
### Updated

README.md

Lines changed: 71 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,81 @@
88
</div>
99

1010
# vue-snap
11-
> Lightweight Slider/Carousel based on CSS Scroll Snap.
11+
> Lightweight Carousel based on CSS Scroll Snap.
12+
13+
## Table of Contents
14+
- [About](#about)
15+
- [Storybook & Docs](#stories--docs)
16+
- [Installation & Usage](#installation--usage)
17+
- [for Vue@2](#for-vue2-version)
18+
- [for Vue@3](#for-vue3-version)
19+
- [Examples](#examples))
20+
- [Contribution](#contribution)
21+
- [License](#license)
1222

1323
## About
14-
Please note that this lib is on very early stage. The idea behind this plugin is that to create fully responsive and well optimised Carousel. I created this as PoC for one of my biggest client, who wants to speed up his website.
24+
Idea behind this plugin is that to create fully responsive and well optimised Carousel.
25+
We used new CSS properties [Scroll Snapping](https://developers.google.com/web/updates/2018/07/css-scroll-snap), which allows us to lock the Carousel Wrapper to certain Slides or locations after a user has finished scrolling. This helps us to minimize library size, with only critical part, and avoid any heavy JS calculations or any CSS Hacks inside.
1526

16-
## Storybook & Docs
27+
## Stories & Docs
1728
- 📕 [Stories](https://vue-snap.surge.sh)
18-
- 📺 [Props/Event](https://vue-snap.surge.sh/?path=/docs/carousel--default)
29+
- 📺 [Props/Events](https://vue-snap.surge.sh/?path=/docs/carousel--default)
1930
- 📖 [Docs (Guide)](https://bartdominiak.github.io/vue-snap)
2031

2132
## Benefits:
2233
- Lightweight (5-10x times lighter than other libs)
23-
- There is no calculation or heavy logic inside (Performence)
24-
- Mostly all custamization via CSS!
25-
- You can set how many slides you want to display per current breakpoint (via css)
26-
- Fully responsive
34+
- There is no calculation or heavy logic inside (Performence aspect)
35+
- Fully responsive and mostly all customization via CSS - like how many Slides do you want to display
36+
- ESM Bundle with Dead Code Elimination (Tree Shaking)
37+
- SSR Support like Nuxt.js 🎉 (Check [examples folder](https://github.com/bartdominiak/vue-snap/tree/master/examples))
38+
- `Vue@3` and `Vue@2` Support 🎉 (Check [installation process](#installation--usage))
39+
- Support all modern/common browsers (Check [here](https://caniuse.com/css-snappoints))
40+
41+
## Installation & Usage
42+
### For `Vue@3` version
43+
#### Installation
44+
45+
```terminal
46+
yarn add vue-snap@next // or npm install vue-snap@next
47+
```
48+
49+
#### Usage - Globally
50+
51+
```js
52+
import { createApp } from 'vue'
53+
import App from './App.vue'
54+
55+
import VueSnap from 'vue-snap'
56+
import 'vue-snap/dist/vue-snap.css'
57+
58+
const myApp = createApp(App)
59+
60+
myApp.use(VueSnap)
61+
myApp.mount('#app')
62+
```
63+
64+
#### Usage - Locally
65+
66+
```js
67+
import { Carousel, Slide } from 'vue-snap'
68+
import 'vue-snap/dist/vue-snap.css'
2769

28-
## Usage
29-
There are two ways to use it.
70+
export default {
71+
components: {
72+
Carousel,
73+
Slide
74+
}
75+
}
76+
```
3077

31-
### Globally
78+
### For `Vue@2` version
79+
#### Installation
80+
81+
```terminal
82+
yarn add vue-snap // or npm install vue-snap
83+
```
84+
85+
#### Usage - Globally
3286

3387
```js
3488
import Vue from 'vue'
@@ -38,7 +92,7 @@ import 'vue-snap/dist/vue-snap.css'
3892
Vue.use(VueSnap)
3993
```
4094

41-
### Locally
95+
#### Usage - Locally
4296

4397
```js
4498
import { Carousel, Slide } from 'vue-snap'
@@ -55,21 +109,11 @@ export default {
55109
### Examples
56110
Check out [examples](https://github.com/bartdominiak/vue-snap/tree/master/examples) folder for more details.
57111

58-
### Unit Testing with Jest
59-
60-
Make sure to whitelist `vue-snap` from the `transformIgnorePattern`. Add following configuation in `test/unit/jest.conf.js`:
61-
62-
```diff
63-
transformIgnorePatterns: [
64-
'/node_modules(?![\\\\/]vue-snap[\\\\/])/'
65-
],
66-
```
67-
68112
## Development
69113

70114
Install necessary depandancies with yarn or npm
71115
```
72-
yarn or npm
116+
yarn // or npm install
73117
```
74118

75119
Run Storybook for development mode
@@ -83,4 +127,7 @@ Release
83127
```
84128

85129
## Contribution
86-
Feel free to grab an issue from the list, just remember to squash your commits before merge.
130+
If you have a feature request then feel free to start a new issue, or just grab existing one.
131+
132+
## License
133+
MIT

config/storybook/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ module.exports = {
55
addons: [
66
'@storybook/addon-a11y',
77
'@storybook/addon-actions',
8-
'@storybook/addon-knobs',
98
'@storybook/addon-viewport',
109
'@storybook/addon-storysource',
11-
'@storybook/addon-docs'
10+
'@storybook/addon-docs',
11+
'@storybook/addon-controls'
1212
],
1313
webpackFinal: async (config) => {
1414
config.module.rules.push({

dist/vue-snap.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
scrollbar-width: none;
1212
-webkit-overflow-scrolling: touch;
1313
-ms-overflow-style: none;
14+
list-style: none;
15+
margin: 0;
16+
padding: 0;
1417
}
1518

1619
.vs-carousel__wrapper::-webkit-scrollbar {

examples/nuxt/pages/index.vue

Lines changed: 0 additions & 42 deletions
This file was deleted.

examples/vue-cli/.gitignore

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/vue-cli/README.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

examples/vue-cli/src/App.vue

Lines changed: 0 additions & 54 deletions
This file was deleted.

examples/vue@2/nuxt/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.nuxt
3+
dist
File renamed without changes.

0 commit comments

Comments
 (0)