§2023-08-09

-Vue.js QuickStart

- 試験機器: x8664Arch.yushei.com.tw, /opt/xfs/vue-proj

 node --version
v20.4.0
[alexlai@x8664Arch vue-proj]$ which node
/usr/bin/node
[alexlai@x8664Arch vue-proj]$ which npm
/usr/bin/npm
[alexlai@x8664Arch vue-proj]$ npm --version
9.8.1
$ npm create vue@latest
Need to install the following packages:
create-vue@3.7.2
Ok to proceed? (y) y

Vue.js - The Progressive JavaScript Framework

✔ Project name: … quickStart
✔ Package name: … quickstart
✔ Add TypeScript? … No / Yes
✔ Add JSX Support? … No / Yes
✔ Add Vue Router for Single Page Application development? … No / Yes
✔ Add Pinia for state management? … No / Yes
✔ Add Vitest for Unit Testing? … No / Yes
✔ Add an End-to-End Testing Solution? › No
✔ Add ESLint for code quality? … No / Yes

Scaffolding project in /opt/xfs/vue-proj/quickStart...

Done. Now run:

  cd quickStart
  npm install
  npm run dev
$ tree quickStart/
quickStart/
├── index.html
├── package.json
├── public
│   └── favicon.ico
├── README.md
├── src
│   ├── App.vue
│   ├── assets
│   │   ├── base.css
│   │   ├── logo.svg
│   │   └── main.css
│   ├── components
│   │   ├── HelloWorld.vue
│   │   ├── icons
│   │   │   ├── IconCommunity.vue
│   │   │   ├── IconDocumentation.vue
│   │   │   ├── IconEcosystem.vue
│   │   │   ├── IconSupport.vue
│   │   │   └── IconTooling.vue
│   │   ├── TheWelcome.vue
│   │   └── WelcomeItem.vue
│   └── main.js
└── vite.config.js

6 directories, 18 files

  1. cd quickStart
$ npm install
$ npm run dev

VITE v4.4.9  ready in 1298 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help

Shortcuts
  press r to restart the server
  press u to show server url
  press o to open in browser
  press c to clear console
  press q to quit

vue-5173.png

Note that the example components in the generated project are written using the Composition API and