├── .browserslistrc ├── public ├── favicon.ico └── index.html ├── src ├── assets │ └── logo.png ├── main.js ├── views │ ├── About.vue │ └── Home.vue ├── components │ ├── Footer.vue │ ├── Button.vue │ ├── Tasks.vue │ ├── Task.vue │ ├── Header.vue │ └── AddTask.vue ├── router │ └── index.js └── App.vue ├── babel.config.js ├── vue.config.js ├── .gitignore ├── README.md ├── db.json └── package.json /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bradtraversy/vue-crash-2021/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bradtraversy/vue-crash-2021/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | createApp(App) 6 | .use(router) 7 | .mount('#app') 8 | -------------------------------------------------------------------------------- /src/views/About.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 12 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | devServer: { 3 | proxy: { 4 | '^/api': { 5 | target: 'http://localhost:5000', 6 | changeOrigin: true, 7 | logLevel: 'debug', 8 | pathRewrite: { '^/api': '/' }, 9 | }, 10 | }, 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /src/components/Footer.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /src/components/Button.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Crash Course (Task Tracker) 2 | 3 | > This is the project from the YouTube crash course 4 | 5 | ## Project setup 6 | 7 | ``` 8 | npm install 9 | ``` 10 | 11 | ## Run the JSON-Server backend (http://localhost:5000) 12 | 13 | ``` 14 | npm run backend 15 | ``` 16 | 17 | ## Run the Vue dev server (http://localhost:8080) 18 | 19 | ``` 20 | npm run serve 21 | ``` 22 | 23 | ## Compiles and minifies for production 24 | 25 | ``` 26 | npm run build 27 | ``` 28 | -------------------------------------------------------------------------------- /db.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": [ 3 | { 4 | "id": "1", 5 | "text": "Doctors Appointment", 6 | "day": "March 5th at 2:30pm", 7 | "reminder": true 8 | }, 9 | { 10 | "id": "2", 11 | "text": "Meeting with boss", 12 | "day": "March 6th at 1:30pm", 13 | "reminder": true 14 | }, 15 | { 16 | "id": "3", 17 | "text": "Food shopping", 18 | "day": "March 7th at 2:00pm", 19 | "reminder": false 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from 'vue-router' 2 | import Home from '../views/Home' 3 | import About from '../views/About' 4 | 5 | const routes = [ 6 | { 7 | path: '/', 8 | name: 'Home', 9 | component: Home, 10 | }, 11 | { 12 | path: '/about', 13 | name: 'About', 14 | component: About, 15 | }, 16 | ] 17 | 18 | const router = createRouter({ 19 | history: createWebHistory(process.env.BASE_URL), 20 | routes, 21 | }) 22 | 23 | export default router 24 | -------------------------------------------------------------------------------- /src/components/Tasks.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-crash-2021", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "backend": "json-server --watch db.json --port 5000" 9 | }, 10 | "dependencies": { 11 | "core-js": "^3.6.5", 12 | "json-server": "^0.16.3", 13 | "vue": "^3.0.0", 14 | "vue-router": "^4.0.4" 15 | }, 16 | "devDependencies": { 17 | "@vue/cli-plugin-babel": "~4.5.0", 18 | "@vue/cli-service": "~4.5.0", 19 | "@vue/compiler-sfc": "^3.0.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/components/Task.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 22 | 23 | 45 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | <%= htmlWebpackPlugin.options.title %> 13 | 14 | 15 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/components/Header.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 36 | 37 | 45 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 35 | 36 | 86 | -------------------------------------------------------------------------------- /src/components/AddTask.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 60 | 61 | 97 | -------------------------------------------------------------------------------- /src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 90 | --------------------------------------------------------------------------------