diff --git a/front/.gitignore b/front/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..185e6631928dca2f51224e61a3861cc88fa2b74e --- /dev/null +++ b/front/.gitignore @@ -0,0 +1,21 @@ +.DS_Store +node_modules +/dist + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw* diff --git a/front/babel.config.js b/front/babel.config.js new file mode 100644 index 0000000000000000000000000000000000000000..3ecebf1a5205f4e3abce8fe0fe1ca72d3f46b643 --- /dev/null +++ b/front/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ["@vue/app"] +}; diff --git a/front/package.json b/front/package.json new file mode 100644 index 0000000000000000000000000000000000000000..696ef87b0e92bd1c0b571e7e25e53fce4e37c97d --- /dev/null +++ b/front/package.json @@ -0,0 +1,49 @@ +{ + "name": "front", + "version": "0.1.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint" + }, + "dependencies": { + "vue": "^2.5.22", + "vue-router": "^3.0.1", + "vuex": "^3.0.1" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "^3.4.0", + "@vue/cli-plugin-eslint": "^3.4.0", + "@vue/cli-service": "^3.4.0", + "@vue/eslint-config-prettier": "^4.0.1", + "babel-eslint": "^10.0.1", + "eslint": "^5.8.0", + "eslint-plugin-vue": "^5.0.0", + "vue-template-compiler": "^2.5.21" + }, + "eslintConfig": { + "root": true, + "env": { + "node": true + }, + "extends": [ + "plugin:vue/essential", + "@vue/prettier" + ], + "rules": {}, + "parserOptions": { + "parser": "babel-eslint" + } + }, + "postcss": { + "plugins": { + "autoprefixer": {} + } + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 8" + ] +} diff --git a/front/public/favicon.ico b/front/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c7b9a43c8cd16d0b434adaf513fcacb340809a11 Binary files /dev/null and b/front/public/favicon.ico differ diff --git a/front/public/index.html b/front/public/index.html new file mode 100644 index 0000000000000000000000000000000000000000..5514f8289d3904c9eb922fe1cbc7fe46c3a1d637 --- /dev/null +++ b/front/public/index.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width,initial-scale=1.0"> + <link rel="icon" href="<%= BASE_URL %>favicon.ico"> + <title>front</title> + </head> + <body> + <noscript> + <strong>We're sorry but front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> + </noscript> + <div id="app"></div> + <!-- built files will be auto injected --> + </body> +</html> diff --git a/front/src/App.vue b/front/src/App.vue new file mode 100644 index 0000000000000000000000000000000000000000..ab8fe3c0a0586e85f4430d14ed127a1e7fcb87d6 --- /dev/null +++ b/front/src/App.vue @@ -0,0 +1,31 @@ +<template> + <div id="app"> + <div id="nav"> + <router-link to="/">Home</router-link> | + <router-link to="/about">About</router-link> + </div> + <router-view /> + </div> +</template> + +<style> +#app { + font-family: "Avenir", Helvetica, Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-align: center; + color: #2c3e50; +} +#nav { + padding: 30px; +} + +#nav a { + font-weight: bold; + color: #2c3e50; +} + +#nav a.router-link-exact-active { + color: #42b983; +} +</style> diff --git a/front/src/components/HelloWorld.vue b/front/src/components/HelloWorld.vue new file mode 100644 index 0000000000000000000000000000000000000000..e8f3285d825765cc9caed25e356f79f1e9ce5db3 --- /dev/null +++ b/front/src/components/HelloWorld.vue @@ -0,0 +1,114 @@ +<template> + <div class="hello"> + <h1>{{ msg }}</h1> + <p> + For a guide and recipes on how to configure / customize this project,<br /> + check out the + <a href="https://cli.vuejs.org" target="_blank" rel="noopener" + >vue-cli documentation</a + >. + </p> + <h3>Installed CLI Plugins</h3> + <ul> + <li> + <a + href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" + target="_blank" + rel="noopener" + >babel</a + > + </li> + <li> + <a + href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" + target="_blank" + rel="noopener" + >eslint</a + > + </li> + </ul> + <h3>Essential Links</h3> + <ul> + <li> + <a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a> + </li> + <li> + <a href="https://forum.vuejs.org" target="_blank" rel="noopener" + >Forum</a + > + </li> + <li> + <a href="https://chat.vuejs.org" target="_blank" rel="noopener" + >Community Chat</a + > + </li> + <li> + <a href="https://twitter.com/vuejs" target="_blank" rel="noopener" + >Twitter</a + > + </li> + <li> + <a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a> + </li> + </ul> + <h3>Ecosystem</h3> + <ul> + <li> + <a href="https://router.vuejs.org" target="_blank" rel="noopener" + >vue-router</a + > + </li> + <li> + <a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a> + </li> + <li> + <a + href="https://github.com/vuejs/vue-devtools#vue-devtools" + target="_blank" + rel="noopener" + >vue-devtools</a + > + </li> + <li> + <a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener" + >vue-loader</a + > + </li> + <li> + <a + href="https://github.com/vuejs/awesome-vue" + target="_blank" + rel="noopener" + >awesome-vue</a + > + </li> + </ul> + </div> +</template> + +<script> +export default { + name: "HelloWorld", + props: { + msg: String + } +}; +</script> + +<!-- Add "scoped" attribute to limit CSS to this component only --> +<style scoped> +h3 { + margin: 40px 0 0; +} +ul { + list-style-type: none; + padding: 0; +} +li { + display: inline-block; + margin: 0 10px; +} +a { + color: #42b983; +} +</style> diff --git a/front/src/main.js b/front/src/main.js new file mode 100644 index 0000000000000000000000000000000000000000..3a47006f036001df0053e1f3b2eafc397a622f0c --- /dev/null +++ b/front/src/main.js @@ -0,0 +1,12 @@ +import Vue from "vue"; +import App from "./App.vue"; +import router from "./router"; +import store from "./store"; + +Vue.config.productionTip = false; + +new Vue({ + router, + store, + render: h => h(App) +}).$mount("#app"); diff --git a/front/src/router.js b/front/src/router.js new file mode 100644 index 0000000000000000000000000000000000000000..7b4bb791ec5bb7aa0ef76fac1691412d8815d0d4 --- /dev/null +++ b/front/src/router.js @@ -0,0 +1,26 @@ +import Vue from "vue"; +import Router from "vue-router"; +import Home from "./views/Home.vue"; + +Vue.use(Router); + +export default new Router({ + mode: "history", + base: process.env.BASE_URL, + routes: [ + { + path: "/", + name: "home", + component: Home + }, + { + path: "/about", + name: "about", + // route level code-splitting + // this generates a separate chunk (about.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => + import(/* webpackChunkName: "about" */ "./views/About.vue") + } + ] +}); diff --git a/front/src/store.js b/front/src/store.js new file mode 100644 index 0000000000000000000000000000000000000000..bb02ce2d2c3ace184b1b4d9f5e98b67d9973b3d8 --- /dev/null +++ b/front/src/store.js @@ -0,0 +1,10 @@ +import Vue from "vue"; +import Vuex from "vuex"; + +Vue.use(Vuex); + +export default new Vuex.Store({ + state: {}, + mutations: {}, + actions: {} +}); diff --git a/front/src/views/About.vue b/front/src/views/About.vue new file mode 100644 index 0000000000000000000000000000000000000000..3fa28070de24f2055171ca2e20543881cb7fdf1c --- /dev/null +++ b/front/src/views/About.vue @@ -0,0 +1,5 @@ +<template> + <div class="about"> + <h1>This is an about page</h1> + </div> +</template> diff --git a/front/src/views/Home.vue b/front/src/views/Home.vue new file mode 100644 index 0000000000000000000000000000000000000000..05494f6544c8f0ba8e4eb40164cabac17075ef55 --- /dev/null +++ b/front/src/views/Home.vue @@ -0,0 +1,18 @@ +<template> + <div class="home"> + <img alt="Vue logo" src="../assets/logo.png" /> + <HelloWorld msg="Welcome to Your Vue.js App" /> + </div> +</template> + +<script> +// @ is an alias to /src +import HelloWorld from "@/components/HelloWorld.vue"; + +export default { + name: "home", + components: { + HelloWorld + } +}; +</script>