vuejs的入门<1>
C:\Users\z>d:
D:>cd D:\Bootstrap\2 进入已创建的目标文件夹创建项目
D:\Bootstrap\2>npm init vue@latest
Need to install the following packages:
create-vue@3.7.5
Ok to proceed? (y) y 可以选no
Vue.js - The Progressive JavaScript Framework
√ Project name: … aaa
√ 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 D:\Bootstrap\2\aaa… aaa是项目名
Done. Now run:
cd aaa 进入刚创建的项目aaa 复制到ccmd ctrl +c是cmd的复制键 ctrl +v粘贴
npm install 复制到ccmd 有点慢
npm run dev 复制到ccmd
看到这项目运行成功了
VITE v4.4.9 ready in 1016 ms
➜ Local: http://localhost:5173/ 把http://localhost:5173/ 复制的浏览器
➜ Network: use --host to expose
➜ press h to show help
第二种方法创建项目 看:https://www.runoob.com/vue3/vue3-create-project.html
C:\Users\zddd>d:
D:>cd D:\Bootstrap\2
D:\Bootstrap\2>vue create vue3-app 语法格式 vue create [options]
Vue CLI v5.0.8
? Please pick a preset: Default ([Vue 3] babel, eslint)
Vue CLI v5.0.8
✨ Creating project in D:\Bootstrap\2\runoob-vue3-app.
🗃 Initializing git repository…
⚙️ Installing CLI plugins. This might take a while…
added 864 packages in 3m
🚀 Invoking generators…
📦 Installing additional dependencies…
added 103 packages in 1m
⚓ Running completion hooks…
📄 Generating README.md…
DONE Compiled successfully in 12169ms 11:09:11
App running at:
- Local: http://localhost:8080/
- Network: http://192.168.1.102:8080/
Note that the development build is not optimized.
To create a production build, run npm run build.
创建vue项目的时候报错:Skipped git commit due to missing username and email in git config.
博主:https://blog.csdn.net/dccose/article/details/126819114
解决:
终端进行配置 以此进行输入即可 只要不报错就没有问题
git config --global user.name “xxxx”
git config --global user.email “xxxx”
配置完成后进行查看
查看配置的用户名: git config user.name
查看配置的邮箱名: git config user.email
————————————————