Permalink
Browse files

Initial commit

  • Loading branch information...
antonreshetov committed Jul 23, 2018
0 parents commit 1dce49e6eed156d2cf171f6392f111f225a80c24
Showing with 13,944 additions and 0 deletions.
  1. +21 −0 .gitignore
  2. +21 −0 LICENSE
  3. +4 −0 README.md
  4. +5 −0 babel.config.js
  5. +1 −0 docs/README.md
  6. +13,740 −0 package-lock.json
  7. +50 −0 package.json
  8. +28 −0 src/Workbench.vue
  9. +44 −0 src/components/Glide.vue
  10. +22 −0 src/components/events.js
  11. +8 −0 src/main.js
@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
21 LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017-present Anton Reshetov

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.
@@ -0,0 +1,4 @@
# vue-glide - Vue component on top of the Glide.js
> Simple wrapper for the Glide.js
The work has just started
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
@@ -0,0 +1 @@
# Docs init

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,50 @@
{
"name": "vue-glide",
"version": "0.1.0",
"private": true,
"main": "src/components/Glide.vue",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"dependencies": {
"@glidejs/glide": "^3.2.1",
"vue": "^2.5.16"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.0-rc.5",
"@vue/cli-plugin-eslint": "^3.0.0-rc.5",
"@vue/cli-service": "^3.0.0-rc.5",
"@vue/eslint-config-standard": "^3.0.0-rc.5",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1",
"vue-template-compiler": "^2.5.16"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"@vue/standard"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
@@ -0,0 +1,28 @@
<template>
<div id="app">
<h1>Workbench</h1>
<vue-glide />
</div>
</template>

<script>
import VueGlide from './components/Glide.vue'
export default {
components: {
[VueGlide.name]: VueGlide
}
}
</script>

<style lang="scss">
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
@@ -0,0 +1,44 @@
<template>
<div class="glide">
<div class="glide__track" data-glide-el="track">
<ul class="glide__slides">
<li class="glide__slide">0</li>
<li class="glide__slide">1</li>
<li class="glide__slide">2</li>
</ul>
</div>
</div>
</template>

<script>
import Glide from '@glidejs/glide'
import '@glidejs/glide/dist/css/glide.core.min.css'
import events from './events'
export default {
name: 'VueGlide',
data () {
return {
glide: undefined
}
},
mounted () {
this.glide = new Glide(this.$el)
this.glide.mount()
this.eventConnector(events)
},
methods: {
eventConnector (events) {
events.map(event => {
this.glide.on(event, () => {
const emmiter = event.replace(/\./, '-')
this.$emit(`glide:${emmiter}`)
})
})
}
}
}
</script>
@@ -0,0 +1,22 @@
export default [
'build.after',
'build.before',
'mount.after',
'mount.before',
'move.after',
'move',
'pause',
'play',
'resize',
'run.after',
'run.before',
'run.end',
'run.offset',
'run.start',
'run',
'swipe.end',
'swipe.move',
'swipe.start',
'translate.jump',
'update'
]
@@ -0,0 +1,8 @@
import Vue from 'vue'
import Workbench from './Workbench.vue'

Vue.config.productionTip = false

new Vue({
render: h => h(Workbench)
}).$mount('#app')

0 comments on commit 1dce49e

Please sign in to comment.