| .vscode | ||
| public | ||
| src | ||
| .gitignore | ||
| docker-compose.yml | ||
| docker-entrypoint.sh | ||
| docker.conf | ||
| index.html | ||
| nginx.conf | ||
| npm | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| run | ||
| vite.config.js | ||
vue-project
This template should help get you started developing with Vue 3 in Vite.
Recommended IDE Setup
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
Customize configuration
See Vite Configuration Reference.
Project Setup
这是基于docker的项目,对于开发环境要求只需要docker,不需要安装node或npm。
./npm install
Compile and Hot-Reload for Development
./npm run dev
Compile and Minify for Production
./npm run build
Run web server
# start server
./run start
# restart
./run restart
# stop
./run stop
文件说明
| 文件 | 说明 |
|---|---|
| docker-compose.yml | docker编排文件,里面可以定义端口、工作目录等 |
| docker-entrypoint.sh | 可以被映射到容器中的/usr/local/bin/docker-entrypoint.sh,定义容器启动后会自动执行的任务 |
| docker.conf | 其中定义容器名称和镜像版本,npm脚本、run脚本、docker-compose.yml文件都依赖这个文件 |
| nginx.conf | 可以被映射到容器中的/usr/local/openresty/nginx/conf/nginx.conf,容器中nginx服务的配置文件 |
| npm | 可以执行容器中的npm命令的自动化脚本,使用方法与原生npm一致,不过要在前面加上./,如./npm run dev |
| run | 用于发布场景的、自动执行容器中的npm run build并运行nginx服务,通过./run start启动容器服务 |