diff --git a/demo/.babelrc b/demo/.babelrc
deleted file mode 100644
index e812394..0000000
--- a/demo/.babelrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "presets": [
- ["env", { "modules": false }],
- "stage-3"
- ]
-}
diff --git a/demo/.editorconfig b/demo/.editorconfig
deleted file mode 100644
index 9d08a1a..0000000
--- a/demo/.editorconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 2
-end_of_line = lf
-insert_final_newline = true
-trim_trailing_whitespace = true
diff --git a/demo/.gitignore b/demo/.gitignore
deleted file mode 100644
index a0446a5..0000000
--- a/demo/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.DS_Store
-node_modules/
-dist/
-npm-debug.log
-yarn-error.log
-
-# Editor directories and files
-.idea
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
diff --git a/demo/README.md b/demo/README.md
deleted file mode 100644
index 6a37289..0000000
--- a/demo/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# vuex-socketio
-
-> Demo for Vuex Socket.io-client Plugin
-
-## Build Setup
-
-``` bash
-# install dependencies
-npm install
-
-# serve with hot reload at localhost:8080 && start node.js server at localhost:3001
-npm run start
-
diff --git a/demo/client/App.vue b/demo/client/App.vue
deleted file mode 100644
index 6d4b6fe..0000000
--- a/demo/client/App.vue
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-
Demo for Socket.io-client Vuex Plugin
-
-
-
-
- Socket Connect
-
- Socket Disconnect
-
- NSP
- Socket Connect
-
- NSP Socket Connect
-
-
-
-
-
-
- Submit
-
-
-
-
Socket response
-
- {{ message }}
-
-
-
-
-
-
- Submit Nsp
-
-
-
-
Namespace socket response
-
- {{ message }}
-
-
-
-
-
-
-
-
-
- {{ message }}
-
-
-
-
-
-
-
-
-
-
diff --git a/demo/client/main.js b/demo/client/main.js
deleted file mode 100644
index a5c5bc5..0000000
--- a/demo/client/main.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import Vue from 'vue';
-import App from './App.vue';
-import store from './store/index.js';
-import 'bootstrap/dist/css/bootstrap.css';
-import 'bootstrap-vue/dist/bootstrap-vue.css';
-import BootstrapVue from 'bootstrap-vue';
-
-Vue.use(BootstrapVue);
-
-// eslint-disable-next-line no-new
-new Vue({
- el: '#app',
- store,
- render: h => h(App)
-});
diff --git a/demo/client/store/channelModule.js b/demo/client/store/channelModule.js
deleted file mode 100644
index 5ed3972..0000000
--- a/demo/client/store/channelModule.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const socketModule = {
- namespaced: true,
- state: {
- channelMessages: [],
- nspChannelMessages: []
- },
- mutations: {
- socketOnMessage (state, message) {
- state.channelMessages.push(message);
- },
- namespaceSocketOnMessage (state, message) {
- state.nspChannelMessages.push(message);
- }
- },
- actions: {
- socketOnMessage: ({ commit }, message) => {
- commit('socketModule/pushMessageToSocketMessages', 'socket on MESSAGE: ' + message, { root: true });
- },
- namespaceSocketOnMessage: ({ commit }, message) => {
- commit('socketModule/pushMessageToSocketMessages', 'namespace/socket on MESSAGE: ' + message, { root: true });
- }
- }
-};
-
-export default socketModule;
diff --git a/demo/client/store/index.js b/demo/client/store/index.js
deleted file mode 100644
index 729abb3..0000000
--- a/demo/client/store/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import socketModule from './socketModule.js';
-import channelModule from './channelModule.js';
-import socketio from 'socket.io-client';
-import createSocketIoPlugin from '../../../src/index.js';
-
-const socket = socketio('http://localhost:3001', { autoConnect: false });
-const nspSocket = socketio('http://localhost:3001/namespace', { autoConnect: false });
-
-const socketIoPlugin = createSocketIoPlugin([socket, nspSocket]);
-
-Vue.use(Vuex);
-
-export default new Vuex.Store({
- modules: {
- socketModule,
- channelModule
- },
- plugins: [socketIoPlugin]
-});
diff --git a/demo/client/store/socketModule.js b/demo/client/store/socketModule.js
deleted file mode 100644
index e9d5046..0000000
--- a/demo/client/store/socketModule.js
+++ /dev/null
@@ -1,44 +0,0 @@
-const socketModule = {
- namespaced: true,
- state: {
- connected: false,
- nspConnected: false,
- socketMessages: []
- },
- mutations: {
- socketOnConnect (state) {
- state.socketMessages.push('socket connected');
- state.connected = true;
- },
- socketOnDisconnect (state) {
- state.socketMessages.push('socket disconnected');
- state.connected = false;
- },
- namespaceSocketOnConnect (state) {
- state.socketMessages.push('namespace/socket connected');
- state.nspConnected = true;
- },
- namespaceSocketOnDisconnect (state) {
- state.socketMessages.push('namespace/socket disconnected');
- state.nspConnected = false;
- },
- pushMessageToSocketMessages (state, message) {
- state.socketMessages.push(message);
- }
-
- },
- actions: {
- socketConnect: () => {},
- socketDisconnect: () => {},
- socketEmitSendMessage: ({ commit }, message) => {
- commit('pushMessageToSocketMessages', 'emit to SEND_MESSAGE: ' + message);
- },
- namespaceSocketConnect: () => {},
- namespaceSocketDisconnect: () => {},
- namespaceSocketEmitSendMessage: ({ commit }, message) => {
- commit('pushMessageToSocketMessages', 'emit to namespace/SEND_MESSAGE: ' + message);
- }
- }
-};
-
-export default socketModule;
diff --git a/demo/index.html b/demo/index.html
deleted file mode 100644
index ed1e2bf..0000000
--- a/demo/index.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- socket-io-plugin
-
-
-
-
-
-
diff --git a/demo/package.json b/demo/package.json
deleted file mode 100644
index a45da1f..0000000
--- a/demo/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "socket-io-plugin",
- "description": "Socket.io Vuex Plugin",
- "version": "1.0.0",
- "author": "Mikhail Rogov ",
- "license": "MIT",
- "private": true,
- "scripts": {
- "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
- "start": "npm run dev | node server.js"
- },
- "dependencies": {
- "bootstrap-vue": "^2.0.0-rc.11",
- "express": "^4.16.3",
- "socket.io": "2.0.3",
- "socket.io-client": "^2.1.1",
- "vue": "^2.5.11",
- "vuex": "^3.0.1"
- },
- "browserslist": [
- "> 1%",
- "last 2 versions",
- "not ie <= 8"
- ],
- "devDependencies": {
- "babel-core": "^6.26.0",
- "babel-loader": "^7.1.2",
- "babel-preset-env": "^1.6.0",
- "babel-preset-stage-3": "^6.24.1",
- "cross-env": "^5.0.5",
- "css-loader": "^0.28.11",
- "file-loader": "^1.1.4",
- "node-sass": "^4.5.3",
- "sass-loader": "^6.0.6",
- "vue-loader": "^13.0.5",
- "vue-template-compiler": "^2.4.4",
- "webpack": "^3.6.0",
- "webpack-dev-server": "^2.9.1"
- }
-}
diff --git a/demo/server.js b/demo/server.js
deleted file mode 100644
index ad701e6..0000000
--- a/demo/server.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/* eslint-disable no-console */
-const express = require('express');
-const app = express();
-
-const server = app.listen(3001, function () {
- console.log('server running on port 3001');
-});
-
-const io = require('socket.io')(server);
-
-io.on('connection', function (socket) {
- console.log('socket id: ', socket.id);
- socket.on('SEND_MESSAGE', function (data) {
- console.log('SEND_MESSAGE', data);
- io.emit('MESSAGE', data);
- });
-});
-
-let nsp = io.of('/namespace');
-nsp.on('connection', function (socket) {
- console.log('namespace socket id: ', socket.id);
- socket.on('SEND_MESSAGE', function (data) {
- console.log('/namespace/SEND_MESSAGE', data);
- nsp.emit('MESSAGE', data);
- });
-});
diff --git a/demo/webpack.config.js b/demo/webpack.config.js
deleted file mode 100644
index 37c7589..0000000
--- a/demo/webpack.config.js
+++ /dev/null
@@ -1,108 +0,0 @@
-var path = require('path');
-var webpack = require('webpack');
-
-module.exports = {
- entry: './client/main.js',
- output: {
- path: path.resolve(__dirname, './dist'),
- publicPath: '/dist/',
- filename: 'build.js'
- },
- module: {
- rules: [
- {
- test: /\.css$/,
- use: [
- 'vue-style-loader',
- 'css-loader'
- ]
- },
- {
- test: /\.scss$/,
- use: [
- 'vue-style-loader',
- 'css-loader',
- 'sass-loader'
- ]
- },
- {
- test: /\.sass$/,
- use: [
- 'vue-style-loader',
- 'css-loader',
- 'sass-loader?indentedSyntax'
- ]
- },
- {
- test: /\.vue$/,
- loader: 'vue-loader',
- options: {
- loaders: {
- // Since sass-loader (weirdly) has SCSS as its default parse mode, we map
- // the "scss" and "sass" values for the lang attribute to the right configs here.
- // other preprocessors should work out of the box, no loader config like this necessary.
- 'scss': [
- 'vue-style-loader',
- 'css-loader',
- 'sass-loader'
- ],
- 'sass': [
- 'vue-style-loader',
- 'css-loader',
- 'sass-loader?indentedSyntax'
- ]
- }
- // other vue-loader options go here
- }
- },
- {
- test: /\.js$/,
- loader: 'babel-loader',
- exclude: /node_modules/
- },
- {
- test: /\.(png|jpg|gif|svg)$/,
- loader: 'file-loader',
- options: {
- name: '[name].[ext]?[hash]'
- }
- }
- ]
- },
- resolve: {
- alias: {
- 'vue$': 'vue/dist/vue.esm.js'
- },
- extensions: ['*', '.js', '.vue', '.json']
- },
- devServer: {
- historyApiFallback: true,
- noInfo: true,
- overlay: true
- },
- performance: {
- hints: false
- },
- devtool: '#eval-source-map'
-};
-
-if (process.env.NODE_ENV === 'production') {
- module.exports.devtool = '#source-map';
- // http://vue-loader.vuejs.org/en/workflow/production.html
- module.exports.plugins = (module.exports.plugins || []).concat([
- new webpack.DefinePlugin({
- 'process.env': {
- NODE_ENV: '"production"'
- }
- }),
- new webpack.optimize.UglifyJsPlugin({
- sourceMap: true,
- compress: {
- warnings: false
- }
- }),
- new webpack.LoaderOptionsPlugin({
- minimize: true
- })
- ]);
-}