Skip to content

Commit fe5372f

Browse files
committed
Merge branch 'master' into umd
# Conflicts: # src/components/Select.vue
2 parents 43aa13c + 609f566 commit fe5372f

39 files changed

+1514
-913
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
# vue-select [![Build Status](https://travis-ci.org/sagalbot/vue-select.svg?branch=master)](https://travis-ci.org/sagalbot/vue-select) [![Code Climate Rating](https://img.shields.io/codeclimate/github/sagalbot/vue-select.svg?style=flat-square)](https://codeclimate.com/github/sagalbot/vue-select) [![Code Coverage](https://img.shields.io/codeclimate/coverage/github/sagalbot/vue-select.svg?style=flat-square)](https://codeclimate.com/github/sagalbot/vue-select) [![No Dependencies](https://img.shields.io/gemnasium/sagalbot/vue-select.svg?style=flat-square)](https://gemnasium.com/github.com/sagalbot/vue-select) ![MIT License](https://img.shields.io/github/license/sagalbot/vue-select.svg?style=flat-square) ![Current Release](https://img.shields.io/github/release/sagalbot/vue-select.svg?style=flat-square)
1+
# vue-select [![Build Status](https://travis-ci.org/sagalbot/vue-select.svg?branch=master)](https://travis-ci.org/sagalbot/vue-select) [![Code Coverage](https://img.shields.io/codeclimate/coverage/github/sagalbot/vue-select.svg?style=flat-square)](https://codeclimate.com/github/sagalbot/vue-select) [![No Dependencies](https://img.shields.io/gemnasium/sagalbot/vue-select.svg?style=flat-square)](https://gemnasium.com/github.com/sagalbot/vue-select) ![MIT License](https://img.shields.io/github/license/sagalbot/vue-select.svg?style=flat-square) ![Current Release](https://img.shields.io/github/release/sagalbot/vue-select.svg?style=flat-square)
2+
3+
> A native Vue.js component that provides similar functionality to Select2 without the overhead of jQuery.
4+
5+
Rather than bringing in jQuery just to use Select2 or Chosen, this Vue.js component provides similar functionality without the extra overhead of jQuery, while providing the same awesome data-binding features you expect from Vue. Vue-select has no JavaScript dependencies other than Vue, and is designed to mimic [Select2](https://github.com/select2/select2).
26

3-
> Rather than bringing in jQuery just to use Select2 or Chosen, this Vue.js component provides similar functionality without the extra overhead of jQuery, while providing the same awesome data-binding features you expect from Vue. Vue-select has no JavaScript dependencies other than Vue, and is designed to mimic [Select2](https://github.com/select2/select2).
47

58
#### Features
69

build/build.js

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ var path = require('path')
66
var config = require('../config')
77
var ora = require('ora')
88
var webpack = require('webpack')
9+
var ghpages = require('gh-pages')
910
var webpackConfig = require('./webpack.prod.conf')
1011
var umdConfig = require('./webpack.umd.conf')
1112

1213
console.log(
13-
' Tip:\n' +
14-
' Built files are meant to be served over an HTTP server.\n' +
15-
' Opening index.html over file:// won\'t work.\n'
14+
' Tip:\n' +
15+
' Built files are meant to be served over an HTTP server.\n' +
16+
' Opening index.html over file:// won\'t work.\n'
1617
)
1718

1819
var spinner = ora('building for production...')
@@ -27,15 +28,25 @@ cp('-R', 'static/', assetsPath)
2728
* Build the /dist/ folder (demo site)
2829
*/
2930
webpack(webpackConfig, function (err, stats) {
30-
spinner.stop()
31-
if (err) throw err
32-
process.stdout.write(stats.toString({
33-
colors: true,
34-
modules: false,
35-
children: false,
36-
chunks: false,
37-
chunkModules: false
38-
}) + '\n')
31+
spinner.stop()
32+
if (err) throw err
33+
process.stdout.write(stats.toString({
34+
colors: true,
35+
modules: false,
36+
children: false,
37+
chunks: false,
38+
chunkModules: false
39+
}) + '\n')
40+
41+
// $ npm run build publish
42+
// This will publish /dist/ to the gh-pages
43+
if (( process.argv.indexOf('publish') > 1 )) {
44+
spinner = ora('Publishing to GitHub Pages...').start()
45+
ghpages.publish(path.join(__dirname, '../dist'), function (err) {
46+
spinner.stop()
47+
if (err) throw err
48+
});
49+
}
3950
})
4051

4152
/**

build/webpack.base.conf.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var projectRoot = path.resolve(__dirname, '../')
55

66
module.exports = {
77
entry: {
8-
app: './src/main.js'
8+
app: './docs/main.js'
99
},
1010
output: {
1111
path: config.build.assetsRoot,
@@ -17,8 +17,9 @@ module.exports = {
1717
fallback: [path.join(__dirname, '../node_modules')],
1818
alias: {
1919
'src': path.resolve(__dirname, '../src'),
20-
'assets': path.resolve(__dirname, '../src/assets'),
21-
'components': path.resolve(__dirname, '../src/components')
20+
'assets': path.resolve(__dirname, '../docs/assets'),
21+
'mixins': path.resolve(__dirname, '../src/mixins'),
22+
'components': path.resolve(__dirname, '../docs/components')
2223
}
2324
},
2425
resolveLoader: {
@@ -45,15 +46,15 @@ module.exports = {
4546
loader: 'vue-html'
4647
},
4748
{
48-
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
49+
test: /\.(png|jpe?g|gif)(\?.*)?$/,
4950
loader: 'url',
5051
query: {
5152
limit: 10000,
5253
name: utils.assetsPath('img/[name].[hash:7].[ext]')
5354
}
5455
},
5556
{
56-
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
57+
test: /\.(woff2?|eot|ttf|otf|svg)(\?.*)?$/,
5758
loader: 'url',
5859
query: {
5960
limit: 10000,

config/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ module.exports = {
66
env: require('./prod.env'),
77
index: path.resolve(__dirname, '../dist/index.html'),
88
assetsRoot: path.resolve(__dirname, '../dist'),
9-
assetsSubDirectory: 'static',
10-
assetsPublicPath: '/',
9+
assetsSubDirectory: '',
10+
assetsPublicPath: ( process.argv.indexOf('publish') > 1 ) ? 'http://sagalbot.github.io/vue-select/' : '/',
1111
productionSourceMap: true
1212
},
1313
dev: {

docs/Docs.vue

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<style lang="scss">
2+
@import 'assets/scss/_demo.scss';
3+
@import 'assets/scss/_cyan_theme.scss';
4+
@import 'assets/scss/_prism.scss';
5+
@import 'assets/scss/_octicons.scss';
6+
</style>
7+
8+
<template>
9+
<div class="container">
10+
<div class="col-md-10 col-md-offset-1">
11+
<examples></examples>
12+
<params></params>
13+
</div>
14+
</div>
15+
</template>
16+
17+
<script type="text/babel">
18+
19+
/**
20+
* Note that this file (and anything other than src/components/Select.vue)
21+
* has nothing to do with how you use vue-select. These files are used
22+
* for the demo site at http://sagalbot.github.io/vue-select/.
23+
*/
24+
25+
import Examples from './components/Examples.vue'
26+
import Params from './components/Params.vue'
27+
import Ajax from './components/snippets/Ajax.vue'
28+
29+
export default {
30+
components: { Params, Examples, Ajax }
31+
}
32+
</script>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)