Project for the Udemy course "Vue Samurai".
The steps for developing the project were:
- Install package manager, packages
- Node and npm:
https://nodejs.org/en/download
- Vue:
npm install vue
in terminal - Vue CLI:
npm install -g @vue/cli
in terminal
- Check NodeJS, npm and VueJS versions:
node -v
npm -v
vue --version
- Create project in the desired directory using the
vue create udemy-vuejs-samurai
command in terminal.
- Test the project with
npm run serve
and openhttp://localhost:8080/
in the browser.
- Add BootstrapVue:
- Run the command
npm install bootstrap-vue-3
in the terminal. - In
package.json
andpackage-lock.json
, check ifbootstrap-vue-3": "^0.5.1
is in "dependencies". - In
main.js
change the code to:
import { createApp } from 'vue';
import App from './App.vue';
import BootstrapVue3 from "bootstrap-vue-3";
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-vue-3/dist/bootstrap-vue-3.css";
const app = createApp(App);
app.use(BootstrapVue3);
app.mount('#app');
- Remove
HelloWorld
component:
- In
src/components
, delete theHelloWorld.vue
file. - In
src/App.vue
, remove references from theHelloWorld
component.
- Add
AppHeader
component:
- In
src/components
, create theAppHeader.vue
file. - In
src/App.vue
, add<AppHeader />
intemplate
andAppHeader
incomponents
ofexport
.
- Add
TrailCard
component:
- In
src/components
, create theTrailCard.vue
file. - TrailCard must have the properties framework, explanation, image, color, link.
- In
src/App.vue
, usev-for
and add<TrailCard />
intemplate
, andTrailCard
incomponents
ofexport
. - In
public
, createtrails.json
file with card objects. - Generate images for cards with
https://stability.ai/stable-diffusion
.
- Add Routes
- Run
npm install vue-router
in the terminal. - In
src
createrouter.js
- Add router in
src/main.js
. - Create
views
folder insrc
. - In
src/views
: create:Home.vue
with code fromApp.vue
.About.vue
with new code.
- Change
App.vue
with<router-view />
in your template.
Udemy - Vue Samurai - Frederico Fortes: https://www.udemy.com/course/curso-vue-js-vue-samurai-domine-os-conceitos-do-vuejs