diff --git a/s9/.babelrc b/s9/.babelrc new file mode 100644 index 0000000..9897749 --- /dev/null +++ b/s9/.babelrc @@ -0,0 +1,5 @@ +{ + "presets": [ + ["es2015", { "modules": false }] + ] +} diff --git a/s9/README.md b/s9/README.md new file mode 100644 index 0000000..60e88e9 --- /dev/null +++ b/s9/README.md @@ -0,0 +1,18 @@ +# vue-cli + +> A Vue.js project + +## Build Setup + +``` bash +# install dependencies +npm install + +# serve with hot reload at localhost:8080 +npm run dev + +# build for production with minification +npm run build +``` + +For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader). diff --git a/s9/index.html b/s9/index.html new file mode 100644 index 0000000..bfe9a09 --- /dev/null +++ b/s9/index.html @@ -0,0 +1,13 @@ + + + + + Vue Components + + + +
+
+ + + diff --git a/s9/package.json b/s9/package.json new file mode 100644 index 0000000..1cb4a85 --- /dev/null +++ b/s9/package.json @@ -0,0 +1,25 @@ +{ + "name": "vue-cli", + "description": "A Vue.js project", + "author": "Maximilian Schwarzmüller ", + "private": true, + "scripts": { + "dev": "cross-env NODE_ENV=development webpack-dev-server --open --inline --hot", + "build": "cross-env NODE_ENV=production webpack --progress --hide-modules" + }, + "dependencies": { + "bootstrap": "^3.3.7", + "vue": "^2.0.1" + }, + "devDependencies": { + "babel-core": "^6.0.0", + "babel-loader": "^6.0.0", + "babel-preset-es2015": "^6.0.0", + "cross-env": "^3.0.0", + "css-loader": "^0.25.0", + "file-loader": "^0.9.0", + "vue-loader": "^9.7.0", + "webpack": "2.1.0-beta.25", + "webpack-dev-server": "2.1.0-beta.0" + } +} diff --git a/s9/src/App.vue b/s9/src/App.vue new file mode 100644 index 0000000..cc2be81 --- /dev/null +++ b/s9/src/App.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/s9/src/assets/logo.png b/s9/src/assets/logo.png new file mode 100644 index 0000000..f3d2503 Binary files /dev/null and b/s9/src/assets/logo.png differ diff --git a/s9/src/main.js b/s9/src/main.js new file mode 100644 index 0000000..385fcfe --- /dev/null +++ b/s9/src/main.js @@ -0,0 +1,7 @@ +import Vue from 'vue' +import App from './App.vue' + +new Vue({ + el: '#app', + render: h => h(App) +}) diff --git a/s9/webpack.config.js b/s9/webpack.config.js new file mode 100644 index 0000000..5eef813 --- /dev/null +++ b/s9/webpack.config.js @@ -0,0 +1,64 @@ +var path = require('path') +var webpack = require('webpack') + +module.exports = { + entry: './src/main.js', + output: { + path: path.resolve(__dirname, './dist'), + publicPath: '/dist/', + filename: 'build.js' + }, + module: { + rules: [ + { + test: /\.vue$/, + loader: 'vue', + options: { + // vue-loader options go here + } + }, + { + test: /\.js$/, + loader: 'babel', + exclude: /node_modules/ + }, + { + test: /\.(png|jpg|gif|svg)$/, + loader: 'file', + options: { + name: '[name].[ext]?[hash]' + } + } + ] + }, + resolve: { + alias: { + 'vue$': 'vue/dist/vue' + } + }, + devServer: { + historyApiFallback: true, + noInfo: true + }, + 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({ + compress: { + warnings: false + } + }), + new webpack.LoaderOptionsPlugin({ + minimize: true + }) + ]) +}