add basic view app
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "airbnb"
|
"extends": "airbnb",
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"node": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
"babel-preset-es2015": "^6.22.0",
|
"babel-preset-es2015": "^6.22.0",
|
||||||
"compression": "^1.0.3",
|
"compression": "^1.0.3",
|
||||||
"cors": "^2.5.2",
|
"cors": "^2.5.2",
|
||||||
|
"css-loader": "^0.26.1",
|
||||||
"favicons-webpack-plugin": "^0.0.7",
|
"favicons-webpack-plugin": "^0.0.7",
|
||||||
"file-loader": "^0.9.0",
|
"file-loader": "^0.9.0",
|
||||||
"helmet": "^1.3.0",
|
"helmet": "^1.3.0",
|
||||||
@@ -24,6 +25,9 @@
|
|||||||
"loopback-boot": "^2.6.5",
|
"loopback-boot": "^2.6.5",
|
||||||
"loopback-component-explorer": "^4.0.0",
|
"loopback-component-explorer": "^4.0.0",
|
||||||
"strong-error-handler": "^1.0.1",
|
"strong-error-handler": "^1.0.1",
|
||||||
|
"vue": "^2.1.10",
|
||||||
|
"vue-loader": "^10.0.2",
|
||||||
|
"vue-template-compiler": "^2.0.0",
|
||||||
"webpack": "^2.2.0",
|
"webpack": "^2.2.0",
|
||||||
"webpack-dev-middleware": "^1.9.0",
|
"webpack-dev-middleware": "^1.9.0",
|
||||||
"webpack-hot-middleware": "^2.15.0",
|
"webpack-hot-middleware": "^2.15.0",
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
resolve: {
|
// resolve: {
|
||||||
alias: {
|
// alias: {
|
||||||
src: `${ROOT}/src`,
|
// src: `${ROOT}/src`,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
devtool: '#eval-source-map',
|
devtool: '#eval-source-map',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,14 +21,9 @@ module.exports = merge(baseConfig, {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
|
||||||
compress: {
|
|
||||||
warnings: false,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
|
|
||||||
new webpack.LoaderOptionsPlugin({
|
new webpack.LoaderOptionsPlugin({
|
||||||
minimize: true,
|
minimize: true,
|
||||||
|
debug: false,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// let webpack generate all your favicons and icons for you
|
// let webpack generate all your favicons and icons for you
|
||||||
|
|||||||
31
src/App.vue
Normal file
31
src/App.vue
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<template>
|
||||||
|
<div class="hello-world">
|
||||||
|
<h1>Welcome to Vue.js</h1>
|
||||||
|
<p>Counter: {{ count }}</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'app',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
count: 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.interval = setInterval(() => {
|
||||||
|
this.count += 1;
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
clearInterval(this.interval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
/* eslint-env browser */
|
import Vue from 'vue';
|
||||||
|
import App from './App.vue';
|
||||||
|
|
||||||
document.querySelector('#app').innerHTML = 'Hello, from main.js!';
|
new Vue({
|
||||||
|
render: h => h(App),
|
||||||
|
}).$mount('#app');
|
||||||
|
|||||||
Reference in New Issue
Block a user