# spa-web **Repository Path**: lzh2019/spa-web ## Basic Information - **Project Name**: spa-web - **Description**: spa练习 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-23 - **Last Updated**: 2021-11-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # spa-web ## Project setup ``` npm install ``` ### Compiles and hot-reloads for development ``` npm run serve ``` ### Compiles and minifies for production ``` npm run build ``` ### 预览build生成的dist包 ``` 1. npm install -g serve 2. serve -s dist (-s意思是将其架设在SPA模式下) ``` ### 删除 node_modules ``` 1. 安装 rimraf npm install rimraf -g 2. 使用命令删除 rimraf node_modules // 也可以删除其它文件夹或文件 ``` ### 安装并使用yarn (Yarn是Facebook最近发布的一款依赖包安装工具。Yarn是一个新的快速安全可信赖的可以替代NPM的依赖管理工具) ``` 1.npm安装yarn npm install -g yarn --registry=https://registry.npm.taobao.org 2.yarn配置依赖包来源 yarn config set registry https://registry.npm.taobao.org -g yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g 3.yarn对vue项目安装依赖 yarn install 4.yarn 启动项目 yarn serve 5.yarn安装npm包 yarn add npm包名 6.yarn 移除npm 包 yarn remove npm包名 7.yarn 升级更新某个依赖 yarn upgrade npm包名 ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/).