diff --git a/.travis.yml b/.travis.yml
index 17c7bc4..58dc582 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,9 @@
language: node_js
+cache: npm
+
node_js:
- node
-cache:
- directories:
- - node_modules
+
script:
- - yarn test --coverage --coverageReporters=text-lcov | coveralls
+ - yarn test --coverage --coverageReporters=text-lcov
+ - codecov
diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js
index c145a8c..6e10a20 100644
--- a/build/webpack.base.conf.js
+++ b/build/webpack.base.conf.js
@@ -1,6 +1,5 @@
const path = require('path');
const webpack = require('webpack');
-const chokidar = require('chokidar');
const VueLoaderPlugin = require('vue-loader').VueLoaderPlugin;
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
@@ -8,7 +7,9 @@ const env = process.env.NODE_ENV === 'production'
? 'production'
: 'development';
-const extractOrInjectStyles = process.env.NODE_ENV !== 'production'
+const devtool = env === 'production' ? 'source-map' : 'eval-source-map';
+
+const extractOrInjectStyles = env !== 'production'
? 'vue-style-loader'
: MiniCssExtractPlugin.loader;
@@ -19,7 +20,7 @@ module.exports = {
publicPath: '/',
filename: '[name].js',
},
- // devtool: env === 'production' ? 'source-map' : 'eval-source-map',
+ devtool,
resolve: {
extensions: ['.js', '.vue'],
alias: {
@@ -47,13 +48,10 @@ module.exports = {
use: [
extractOrInjectStyles,
'css-loader',
+ 'postcss-loader',
'sass-loader',
],
},
- {
- test: /\.html$/,
- loader: 'vue-html-loader',
- },
],
},
plugins: [
@@ -65,17 +63,8 @@ module.exports = {
}),
new VueLoaderPlugin(),
],
- devServer: {
- hot: true,
- hotOnly: true,
- inline: true,
- port: 8080,
- before (app, server) {
- chokidar.watch([
- './**/*.html',
- ]).on('all', function () {
- server.sockWrite(server.sockets, 'content-changed');
- });
- },
+ stats: {
+ children: false,
+ modules: false,
},
};
diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js
index 437a6d6..9c0d519 100644
--- a/build/webpack.dev.conf.js
+++ b/build/webpack.dev.conf.js
@@ -1,12 +1,15 @@
const merge = require('webpack-merge');
+const chokidar = require('chokidar');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const baseWebpackConfig = require('./webpack.base.conf');
+/**
+ *
+ */
module.exports = merge(baseWebpackConfig, {
entry: './dev/dev.js',
plugins: [
new HtmlWebpackPlugin({
- filename: 'index.html',
template: './dev/dev.html',
inject: true,
}),
@@ -14,4 +17,23 @@ module.exports = merge(baseWebpackConfig, {
optimization: {
noEmitOnErrors: true,
},
+ devServer: {
+ hot: true,
+ hotOnly: true,
+ open: true,
+ inline: true,
+ stats: {
+ children: false,
+ modules: false,
+ chunks: false,
+ },
+ port: 8080,
+ before (app, server) {
+ chokidar.watch([
+ './**/*.html',
+ ]).on('all', function () {
+ server.sockWrite(server.sockets, 'content-changed');
+ });
+ },
+ },
});
diff --git a/dev/Dev.vue b/dev/Dev.vue
index 8db82ff..62735dc 100644
--- a/dev/Dev.vue
+++ b/dev/Dev.vue
@@ -1,130 +1,35 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{option.label}}
+
+
+
+
+
-
- {{option.label}} ({{option.value}})
-
-
-
-
- {{option.label}}
-
-
- {{option.label}}
-
-
-
-
- {{ props.option.label }} ({{ props.option.value }})
-
-
-
-
-
-
-
-
-
- {{ option.title }}
- {{ `${option.author.firstName} ${option.author.lastName}` }}
-
-
+
diff --git a/dev/dev.html b/dev/dev.html
index 28cfe70..ec7c6e9 100644
--- a/dev/dev.html
+++ b/dev/dev.html
@@ -1,87 +1,14 @@
-
-
- Vue Select Dev
-
-
-
-
-
+
+ Vue Select Dev
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{option.label}}
-
-
- {{option.label}} ({{option.value}})
-
-
-
-
- {{option.label}}
-
-
- {{option.label}}
-
-
-
-
- {{ props.option.label }} ({{ props.option.value }})
-
-
-
-
-
-
-
-
-
- {{ option.title }}
- {{ option.author.firstName + ' ' + option.author.lastName }}
-
-
-
- Custom no options message
-
-
+
-
diff --git a/docs/.vuepress/components/HomePage.vue b/docs/.vuepress/components/HomePage.vue
deleted file mode 100644
index 6bc7e9d..0000000
--- a/docs/.vuepress/components/HomePage.vue
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
Vue Select
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A Vue.js select component that provides similar functionality
- to Select2/Chosen without the overhead of jQuery.
-
-
-
-
-
-
- {{ option.title }}
-
-
-
-
-
-
-
- - Supports Vuex
- - Tagging Support
- - Custom Templating
- - Zero JS/CSS dependencies
- - Custom Filtering Algorithms
-
-
-
- - +95% Test Coverage
- - Select Single/Multiple
- - Typeahead Suggestions
- - Supports RTL & Translations
- - Plays nice with CSS Frameworks
-
-
-
-
- And so much more! Get started with:
- yarn add vue-select
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/.vuepress/components/Sandbox.vue b/docs/.vuepress/components/Sandbox.vue
new file mode 100644
index 0000000..6d38c32
--- /dev/null
+++ b/docs/.vuepress/components/Sandbox.vue
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ label }} -- {{ value }}
+
+
+ {{ label }} ({{ value }})
+
+
+
+
+
+
+
+ {{ label }}
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ option.title }}
+ {{ `${option.author.firstName} ${option.author.lastName}` }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 7b5ec1d..f0bf51b 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -1,34 +1,44 @@
+const isDeployPreview = process.env.hasOwnProperty('DEPLOY_PREVIEW');
+
const meta = {
title: 'Vue Select | VueJS Select2/Chosen Component',
- description: 'A well-tested, native Vue.js component that provides similar functionality to Select2/Chosen without the overhead of jQuery.',
- icon: 'static/vue-logo.png',
+ description: 'Everything you wish the native