Skip to content

Commit

Permalink
Merge branch 'release/0.1.0-alpha.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartosz Dominiak committed Jun 13, 2020
2 parents 776d43a + f57b5ee commit e4a7747
Show file tree
Hide file tree
Showing 29 changed files with 5,255 additions and 551 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
extends: [
'plugin:vue/recommended'
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.DS_Store
dist/stats.json
dist/vue-snap.js
storybook-static
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
cache:
yarn: true
directories:
- "node_modules"
language: node_js
node_js:
- 12
install:
- yarn install
script:
- yarn lint
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.1.0-alpha.2] - 2020-06-13
### Added
- initialize eslint #8
- initilize git hooks (husky) #8
- initialize VuePress #6
- Storybook Addons (docs, a11y, actions, knobs, viewport, storysource) #2
- props/slots preview #2
- initilize travis #7

## [0.1.0-alpha.1] - 2020-06-12
### Added
- Project init
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Bartosz Dominiak

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[![npm version](https://badge.fury.io/js/vue-snap.svg)](https://badge.fury.io/js/vue-snap)
[![Build Status](https://travis-ci.org/bartdominiak/vue-snap.svg?branch=develop)](https://travis-ci.org/bartdominiak/vue-snap)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/vue-snap)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/bartdominiak/vue-snap/blob/master/LICENSE.md)

<div align="center">
<img width="256" heigth="256" src="/static/snap.jpg" alt="vue-snap logo">
</div>

# vue-snap
> Lightweight Slider/Carousel based on CSS Scroll Snap and Vue
Expand Down
8 changes: 8 additions & 0 deletions config/storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
module.exports = {
stories: ['../../src/**/*.stories.@(js|mdx)'],
addons: [
'@storybook/addon-a11y',
'@storybook/addon-actions',
'@storybook/addon-knobs',
'@storybook/addon-viewport',
'@storybook/addon-storysource',
'@storybook/addon-docs'
],
webpackFinal: async (config) => {
config.module.rules.push({
test: /\.scss$/,
Expand Down
19 changes: 19 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env sh

# abort on errors
set -e

# build
npm run docs:build

# navigate into the build output directory
cd docs/.vuepress/dist

git init
git add -A
git commit -m 'deploy'

# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f [email protected]:bartdominiak/vue-snap.git master:gh-pages

cd -
290 changes: 0 additions & 290 deletions dist/vue-snap.js

This file was deleted.

2 changes: 1 addition & 1 deletion dist/vue-snap.min.js

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
title: 'VueSnap',
description: 'Lightweight Slider/Carousel based on CSS Scroll Snap',
themeConfig: {
nav: [
{ text: 'Guide', link: '/guide/' },
// { text: 'Examples', link: '/examples/' },
// { text: 'API', link: '/api/' }
],
repo: 'bartdominiak/vue-snap',
editLinks: true,
editLinkText: 'Help us improve this page!',
serviceWorker: true,
docsDir: 'docs',
docsBranch: 'master'
}
}
7 changes: 7 additions & 0 deletions docs/.vuepress/public/snap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
home: true
heroImage: /snap.svg
actionText: Get Started →
actionLink: /guide/
features:
- title: Fully responsive
details: With the full power of CSS 💪
- title: Optimised
details: Without heavy calculations 💯
- title: Performance
details: Reduce the overall load time of your site 💪
footer: MIT Licensed | Copyright © 2020 Bartosz Dominiak
---
1 change: 1 addition & 0 deletions docs/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Hello examples
1 change: 1 addition & 0 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Hello VuePress
51 changes: 51 additions & 0 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Guide

## Installation

```
yarn
```

or if you preffer npm

```
npm
```

## Locally

```js
import { Carousel, Slide } from 'vue-snap'

export default {
components: {
Carousel,
Slide
}
}
```

## Globally

```js
import Vue from 'vue'
import VueSnap from 'vue-snap'

Vue.use(VueSnap)
```

## HTML Markup

```html
<carousel>
<slide>
1
</slide>
<slide>
2
</slide>
<slide>
3
</slide>
</carousel>
```
48 changes: 34 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,69 @@
{
"name": "vue-snap",
"version": "0.1.0-alpha.1",
"description": "Lightweight Carousel based on CSS Scroll Snap and Vue",
"version": "0.1.0-alpha.2",
"description": "Lightweight Carousel based on CSS Scroll Snap",
"main": "dist/vue-snap.min.js",
"engines": {
"node": ">=12.13.0 <13.0.0"
},
"scripts": {
"dev": "webpack --config ./config/webpack/webpack.dev.js --watch",
"build": "webpack --config ./config/webpack/webpack.prod.js",
"storybook:dev": "start-storybook -s ./static -c ./config/storybook",
"storybook:build": "build-storybook -s ./static -c ./config/storybook",
"analyse": "webpack --config ./config/webpack/webpack.prod.js --profile --json > ./dist/stats.json && webpack-bundle-analyzer ./dist/stats.json -m static -r ./dist/report.html",
"lint": "eslint src/**/*.{js,vue}",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/bartdominiak/vue-snap.git"
},
"keywords": [
"Vue",
"vue",
"vue-snap",
"carousel",
"slider",
"responsive",
"scroll",
"snap",
"CSS"
"scroll-snap"
],
"author": "[email protected]",
"license": "MIT",
"bugs": {
"url": "https://github.com/bartdominiak/vue-snap/issues"
},
"homepage": "https://github.com/bartdominiak/vue-snap#README",
"scripts": {
"dev": "webpack --config ./config/webpack/webpack.dev.js --watch",
"build": "webpack --config ./config/webpack/webpack.prod.js",
"storybook": "start-storybook -c ./config/storybook",
"components": "build-storybook -c ./config/storybook",
"analyse": "webpack --config ./config/webpack/webpack.prod.js --profile --json > ./dist/stats.json && webpack-bundle-analyzer ./dist/stats.json -m static -r ./dist/report.html"
},
"dependencies": {
"vue": "^2.6.11"
},
"devDependencies": {
"@babel/core": "^7.10.2",
"@storybook/addon-a11y": "6.0.0-beta.25",
"@storybook/addon-actions": "^6.0.0-beta.25",
"@storybook/addon-docs": "^6.0.0-beta.25",
"@storybook/addon-knobs": "^6.0.0-beta.25",
"@storybook/addon-storysource": "^6.0.0-beta.25",
"@storybook/addon-viewport": "^6.0.0-beta.25",
"@storybook/vue": "^6.0.0-beta.25",
"babel-loader": "^8.1.0",
"css-loader": "^3.5.3",
"eslint": "^7.2.0",
"eslint-plugin-vue": "^6.2.2",
"husky": "^4.2.5",
"node-sass": "^4.14.1",
"sass-loader": "^8.0.2",
"vue-loader": "^15.9.2",
"vue-template-compiler": "^2.6.11",
"vuepress": "^1.5.1",
"webpack": "^4.43.0",
"webpack-bundle-analyzer": "^3.8.0",
"webpack-cli": "^3.3.11",
"webpack-merge": "^4.2.2"
},
"husky": {
"hooks": {
"pre-commit": "yarn lint",
"pre-push": "yarn lint"
}
}
}
5 changes: 5 additions & 0 deletions src/assets/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@

&__slide {
flex: 0 0 100%;
height: 100%;
scroll-snap-align: start;
display: flex;
justify-content: center;
align-items: center;
outline: none;
}

&__navigation {
Expand Down
48 changes: 48 additions & 0 deletions src/assets/_examples.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.example-default {
.vs-carousel__slide {
font-size: 40px;
color: white;

&:nth-child(n+1) {
background: #2e5c8a;
}

&:nth-child(2n+1) {
background: #336699;
}
}
}

.example-multiple {
.vs-carousel__slide {
flex: 0 0 100%;

@media (min-width: 500px) {
flex: 0 0 50%;
}

@media (min-width: 768px) {
flex: 0 0 33.33%;
}

@media (min-width: 1024px) {
flex: 0 0 25%;
}

@media (min-width: 1280px) and (max-width: 1440px) {
flex: 0 0 20%;
}
}
}

.example-images {
&__image {
height: 100%;
width: auto;
}

.vs-carousel__navigation {
border: 2px solid #000;
border-radius: 4px;
}
}
39 changes: 0 additions & 39 deletions src/assets/_extend.scss

This file was deleted.

Loading

0 comments on commit e4a7747

Please sign in to comment.