From 4580c5fb94da449ddadce1c016fc3965ba4be0ec Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Fri, 4 Nov 2016 15:33:20 -0400 Subject: [PATCH] Initial commit --- .babelrc | 5 +++++ .editorconfig | 11 +++++++++ .gitignore | 2 ++ app/App.vue | 5 +++++ app/index.js | 25 +++++++++++++++++++++ app/routes.js | 12 ++++++++++ app/views/dashboardView.vue | 3 +++ app/views/index.js | 4 ++++ app/views/publicView.vue | 5 +++++ index.html | 15 +++++++++++++ package.json | 45 +++++++++++++++++++++++++++++++++++++ webpack.config.js | 42 ++++++++++++++++++++++++++++++++++ 12 files changed, 174 insertions(+) create mode 100644 .babelrc create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 app/App.vue create mode 100644 app/index.js create mode 100644 app/routes.js create mode 100644 app/views/dashboardView.vue create mode 100644 app/views/index.js create mode 100644 app/views/publicView.vue create mode 100644 index.html create mode 100644 package.json create mode 100644 webpack.config.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..ca00cad --- /dev/null +++ b/.babelrc @@ -0,0 +1,5 @@ +{ + "presets": [ + ["es2015", "stage-2"] + ] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c00910a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +# editorconfig.org +# editorconfig is a unified configuration file that all editors can take +# into account +root = true + +[*] +charset = utf-8 +end_of_line = lf +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1eae0cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist/ +node_modules/ diff --git a/app/App.vue b/app/App.vue new file mode 100644 index 0000000..9ac1e1d --- /dev/null +++ b/app/App.vue @@ -0,0 +1,5 @@ + diff --git a/app/index.js b/app/index.js new file mode 100644 index 0000000..91ca4ec --- /dev/null +++ b/app/index.js @@ -0,0 +1,25 @@ +// NPM imports +import Vue from 'vue' +import VueRouter from 'vue-router' + +// Local imports +import App from './App.vue' +import routes from './routes' + +// Initialize Vue +Vue.use(VueRouter) + +// Initialize router +const router = new VueRouter({ + routes +}) + +// Initialize application +document.addEventListener('DOMContentLoaded', () => { + new Vue({ + el: '[role=application]', + render: h => h(App), + router + }) + console.log('App has been initialized.') +}) diff --git a/app/routes.js b/app/routes.js new file mode 100644 index 0000000..683dbd7 --- /dev/null +++ b/app/routes.js @@ -0,0 +1,12 @@ +import { publicView, dashboardView } from './views'; + +export default [ + { + path: '/', + component: publicView + }, + { + path: '/dashboard', + component: dashboardView + } +] diff --git a/app/views/dashboardView.vue b/app/views/dashboardView.vue new file mode 100644 index 0000000..135afe0 --- /dev/null +++ b/app/views/dashboardView.vue @@ -0,0 +1,3 @@ + diff --git a/app/views/index.js b/app/views/index.js new file mode 100644 index 0000000..a98bf3f --- /dev/null +++ b/app/views/index.js @@ -0,0 +1,4 @@ +import publicView from './publicView.vue' +import dashboardView from './dashboardView.vue' + +export { publicView, dashboardView } diff --git a/app/views/publicView.vue b/app/views/publicView.vue new file mode 100644 index 0000000..30d3ba7 --- /dev/null +++ b/app/views/publicView.vue @@ -0,0 +1,5 @@ + diff --git a/index.html b/index.html new file mode 100644 index 0000000..a3500ba --- /dev/null +++ b/index.html @@ -0,0 +1,15 @@ + + + + + RSVP + + + + +
+ + + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..9dd5400 --- /dev/null +++ b/package.json @@ -0,0 +1,45 @@ +{ + "name": "RSVP", + "version": "", + "cozy-type": "static", + "cozy-displayName": "RSVP", + "cozy-color": "", + "description": "", + "license": "", + "repository": { + "type": "git", + "url": "" + }, + "icon-path": "", + "cozy-permissions": { + "event": { + "description": "Needed to hide conflicting time slots from the time slot selection." + } + }, + "scripts": { + "build:prod": "cross-env NODE_ENV=production webpack -p", + "build:dev": "cross-env NODE_ENV=development webpack", + "lint": "standard 'app/**/*.js' 'webpack.config.js'", + "clean": "rimraf dist/*" + }, + "contributors": [ + "Phyks (Lucas Verney)" + ], + "dependencies": { + "vue": "^2.0.3", + "vue-router": "^2.0.1" + }, + "devDependencies": { + "autoprefixer": "^6.5.1", + "babel-core": "^6.18.2", + "babel-loader": "^6.2.7", + "babel-preset-es2015": "^6.18.0", + "cross-env": "^3.1.3", + "css-loader": "^0.25.0", + "debug-loader": "0.0.1", + "rimraf": "^2.5.4", + "standard": "^8.5.0", + "vue-loader": "^9.7.0", + "webpack": "^1.13.3" + } +} diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..be4b23e --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,42 @@ +'use strict' + +const path = require('path') +const webpack = require('webpack') + +module.exports = { + context: path.join(__dirname, 'app'), + entry: { + app: './index.js' + }, + output: { + path: path.join(__dirname, 'dist'), + filename: '[name].bundle.js' + }, + module: { + loaders: [ + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel', + }, + { + test: /\.vue$/, + loader: 'vue' + } + ] + }, + vue: { + postcss: [ + require('autoprefixer')({ + browsers: ['last 3 versions'] + }) + ] + }, + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ + name: 'commons', + filename: 'commons.bundle.js', + minChunks: 2 + }) + ] +}