过年隔离这几天简单的看了vue开发,结果回来就被拉到前端做壮丁。。。
目前装备水平
html & css: 大学选修课写过简历静态页面,之后再没写过。
javascript: 听说过,没写过。
Vue: 听说过,没写过。
Vue学习路线


- 没有4了,已经被拉壮丁了。。
前端工程接入
- 安装 npm
- 安装依赖
$ npm install - 安装报错:node版本不对,需要安装 nvm 管理 node 版本
- 安装nvm:需要切换国内源再安装,否则。。。
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
$ source ~/.zshrc
$ brew install nvm
- 安装后报错: nvm command not found,按照安装后的提示操作即可
You should create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
Add the following to ~/.zshrc or your desired shell
configuration file:
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
You can set $NVM_DIR to any location, but leaving it unchanged from
/usr/local/opt/nvm will destroy any nvm-installed Node installations
upon upgrade/reinstall.
- 安装指定版本node
$ nvm install x.x.x - 运行
$npm run dev - 运行时 eslint 报错,可以在 .eslintrc.js 文件配置规则
总结
多看官网,多学英语,多google,最后再请教~