Skip to content

Commit

Permalink
feat(setup): initial master
Browse files Browse the repository at this point in the history
  • Loading branch information
toddlawton committed Dec 29, 2016
2 parents 114fafc + e09f153 commit afb9b54
Show file tree
Hide file tree
Showing 78 changed files with 11,464 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime"],
"comments": false
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
node_modules/
npm-debug.log
test/unit/coverage
58 changes: 57 additions & 1 deletion README.md
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 **&lt;carousel&gt;** and **&lt;slide&gt;** 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>
```
54 changes: 54 additions & 0 deletions config/webpack.base.conf.js
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)
]
}
22 changes: 22 additions & 0 deletions config/webpack.min.conf.js
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
6 changes: 6 additions & 0 deletions dist/vue-carousel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions docs/.gitignore
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*/
71 changes: 71 additions & 0 deletions docs/_config.yml
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:
19 changes: 19 additions & 0 deletions docs/package.json
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"
}
}
4 changes: 4 additions & 0 deletions docs/scaffolds/draft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: {{ title }}
tags:
---
4 changes: 4 additions & 0 deletions docs/scaffolds/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: {{ title }}
date: {{ date }}
---
5 changes: 5 additions & 0 deletions docs/scaffolds/post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: {{ title }}
date: {{ date }}
tags:
---
5 changes: 5 additions & 0 deletions docs/source/_posts/home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: home
date: 2016-12-29 15:37:46
tags:
---
Loading

0 comments on commit afb9b54

Please sign in to comment.