VueJS project using Vite for deployment and preview.
npm install
npm run dev
npm run serve
npm run build
npm run deploy
To add a page :
- create one folder in
./srcand create, inside two files :page-name.vueandpage-name.js. Link them appropriately. - create one folder in the root. Inside, create a
index.htmlthat links to thepage-name.js - add them in
vite.config.js - don't forget to update
BaseNav.vueif needed
If needed, you can see the commit outreach page add.
To add a component :
- create a
ComponentName.vueinside./src/components/.- put and complete this inside :
<script setup></script> <template> // put html in here </template> <style scoped lang="scss"> @use "../assets/base.scss"; </style> - You can now add this component to a page by using
import ComponentName from '../../src/components/ComponentName.vue'in the<script setup>, and using it with the<ComponentName/>tag inside the html.
If needed, you can see an example in the commit main home page component add