- You can run
npm installto setup the project npm startto open the project in the development server on your default browser automatically just if you prefernpm run buildto build the project for productionnpm run previewto view the project in the production environment after build script.
- The web page displays a list of hotels and each one has a name, an address, a rating, and a button to book it.
- when the user clicks the
Bookbutton, a form will display so the user can enter his name, email, and phone number. - when the user submits the form, a thanks message will display for the user
saying
Thank you for booking with us.
- if the user wants to book another hotel a welcome message will display to confirm the booking and then a thanks message will display again.
- the web provides cart functionality so the user can see all his bookings and cancel the booking he wants.
- the app saves the user name and booking list in the browser so it wouldn't be lost when refreshing the page.
- Vue.js Framework with Vite as build tool
- Typescript
- Pinia
- Vue Router
- Sass
- Vue Material Design Icons
- Autoprefixer
This template should help get you started developing with Vue 3 in Vite.
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensionsfrom VSCode's command palette - Find
TypeScript and JavaScript Language Features, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Windowfrom the command palette.
See Vite Configuration Reference.
npm installnpm run devnpm run buildRun Unit Tests with Vitest
npm run test:unitLint with ESLint
npm run lint