-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
11,464 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": ["es2015", "stage-2"], | ||
"plugins": ["transform-runtime"], | ||
"comments": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
node_modules/ | ||
npm-debug.log | ||
test/unit/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,57 @@ | ||
# vue-carousel | ||
# Vue Carousel | ||
|
||
<img width="60" src="https://ssense.github.io/vue-carousel/images/logo.png" alt="Vue Carousel" /> | ||
|
||
* [Installation and usage guide](https://ssense.github.io/vue-carousel/guide/) | ||
* [API guide](https://ssense.github.io/vue-carousel/api/) | ||
* [Examples](https://ssense.github.io/vue-carousel/examples/) | ||
|
||
## Installation | ||
|
||
``` bash | ||
npm install -S @ssense/vue-carousel | ||
``` | ||
|
||
## Usage (Global) | ||
|
||
You may install Vue Carousel globally: | ||
|
||
``` js | ||
import Vue from 'vue'; | ||
import VueCarousel from '@ssense/vue-carousel'; | ||
|
||
Vue.use(VueCarousel); | ||
``` | ||
This will make **<carousel>** and **<slide>** available to all components within your Vue app. | ||
|
||
## Usage (Local) | ||
|
||
Include the carousel directly into your component using import: | ||
|
||
``` js | ||
import { Carousel, Slide } from '@ssense/vue-carousel'; | ||
|
||
export default { | ||
... | ||
components: { | ||
Carousel, | ||
Slide | ||
} | ||
... | ||
}; | ||
``` | ||
|
||
## HTML Structure | ||
|
||
Once the **Carousel** and **Slide** components are installed globally or imported, they can be used in templates in the following manner: | ||
|
||
``` html | ||
<carousel> | ||
<slide> | ||
Slide 1 Content | ||
</slide> | ||
<slide> | ||
Slide 2 Content | ||
</slide> | ||
</carousel> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* eslint-disable */ | ||
|
||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const npmCfg = require('../package.json'); | ||
const projectRoot = path.resolve(__dirname, '../'); | ||
|
||
var banner = [ | ||
'vue-carousel v' + npmCfg.version, | ||
'(c) ' + (new Date().getFullYear()) + ' ' + npmCfg.author, | ||
npmCfg.homepage | ||
].join('\n') | ||
|
||
module.exports = { | ||
entry: './src/', | ||
output: { | ||
path: path.resolve(__dirname, '../dist'), | ||
filename: 'vue-carousel.js', | ||
library: 'VueCarousel', | ||
libraryTarget: 'umd' | ||
}, | ||
resolve: { | ||
extensions: ['', '.js', '.vue'], | ||
fallback: [path.join(__dirname, '../node_modules')], | ||
alias: { | ||
'vue$': 'vue/dist/vue.common.js', | ||
} | ||
}, | ||
resolveLoader: { | ||
fallback: [path.join(__dirname, '../node_modules')] | ||
}, | ||
module: { | ||
loaders: [ | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue' | ||
}, | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel', | ||
include: projectRoot, | ||
exclude: /node_modules/, | ||
} | ||
] | ||
}, | ||
vue: { | ||
loaders: { | ||
js: 'babel' | ||
} | ||
}, | ||
plugins: [ | ||
new webpack.BannerPlugin(banner) | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-disable */ | ||
|
||
const webpack = require('webpack') | ||
const base = require('./webpack.base.conf') | ||
|
||
var config = Object.assign({}, base) | ||
|
||
config.output.filename = 'vue-carousel.min.js' | ||
|
||
config.plugins = (config.plugins || []).concat([ | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { warnings: false }, | ||
sourceMap: false | ||
}), | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: '"production"' | ||
} | ||
}), | ||
]) | ||
|
||
module.exports = config |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
Thumbs.db | ||
db.json | ||
*.log | ||
node_modules/ | ||
public/ | ||
.deploy*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Hexo Configuration | ||
## Docs: https://hexo.io/docs/configuration.html | ||
## Source: https://github.com/hexojs/hexo/ | ||
|
||
# Site | ||
title: Vue Carousel | ||
subtitle: | ||
description: | ||
author: SSENSE | ||
language: | ||
timezone: | ||
|
||
# URL | ||
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' | ||
url: http://ssense.github.io/vue-carousel/ | ||
root: /vue-carousel/ | ||
permalink: :year/:month/:day/:title/ | ||
permalink_defaults: | ||
|
||
# Directory | ||
source_dir: source | ||
public_dir: public | ||
tag_dir: tags | ||
archive_dir: archives | ||
category_dir: categories | ||
code_dir: downloads/code | ||
i18n_dir: :lang | ||
skip_render: | ||
|
||
# Writing | ||
new_post_name: :title.md # File name of new posts | ||
default_layout: post | ||
titlecase: false # Transform title into titlecase | ||
external_link: true # Open external links in new tab | ||
filename_case: 0 | ||
render_drafts: false | ||
post_asset_folder: false | ||
relative_link: false | ||
future: true | ||
highlight: | ||
enable: true | ||
line_number: true | ||
auto_detect: false | ||
tab_replace: | ||
|
||
# Category & Tag | ||
default_category: uncategorized | ||
category_map: | ||
tag_map: | ||
|
||
# Date / Time format | ||
## Hexo uses Moment.js to parse and display date | ||
## You can customize the date format as defined in | ||
## http://momentjs.com/docs/#/displaying/format/ | ||
date_format: YYYY-MM-DD | ||
time_format: HH:mm:ss | ||
|
||
# Pagination | ||
## Set per_page to 0 to disable pagination | ||
per_page: 10 | ||
pagination_dir: page | ||
|
||
# Extensions | ||
## Plugins: https://hexo.io/plugins/ | ||
## Themes: https://hexo.io/themes/ | ||
theme: vue | ||
|
||
# Deployment | ||
## Docs: https://hexo.io/docs/deployment.html | ||
deploy: | ||
type: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "hexo-site", | ||
"version": "0.0.0", | ||
"private": true, | ||
"hexo": { | ||
"version": "3.2.2" | ||
}, | ||
"dependencies": { | ||
"hexo": "^3.2.0", | ||
"hexo-generator-archive": "^0.1.4", | ||
"hexo-generator-category": "^0.1.3", | ||
"hexo-generator-index": "^0.2.0", | ||
"hexo-generator-tag": "^0.2.0", | ||
"hexo-renderer-ejs": "^0.2.0", | ||
"hexo-renderer-stylus": "^0.3.1", | ||
"hexo-renderer-marked": "^0.2.10", | ||
"hexo-server": "^0.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: {{ title }} | ||
tags: | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: {{ title }} | ||
date: {{ date }} | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: {{ title }} | ||
date: {{ date }} | ||
tags: | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: home | ||
date: 2016-12-29 15:37:46 | ||
tags: | ||
--- |
Oops, something went wrong.