欢迎关注我的公众号 [极智视界],获取我的更多笔记分享
Hello everyone, my name is Jizhi Vision. This article introduces how to install vue on ubuntu and create a project.
Vue is a progressive framework for building user interfaces, focusing on the view layer, which is not only easy to get started, but also easy to integrate with third-party libraries and existing projects.
Start below.
1 ubuntu cheap vue
Install the node version management tool nvm:
sudo apt-get update
sudo apt install curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
source ~/.bashrc
复制代码
Install node using nvm:
# 查看官方提供的可安装node版本
nvm ls-remote
# 安装执行版本的node,例如:nvm install v10.15.2
nvm install <version>
# 卸载node版本,例如:nvm uninstall v10.15.2
nvm uninstall <version>
# 查看已安装的node列表
nvm ls
# 切换node版本,例如:nvm use v10.15.2
nvm use <version>
# 设置默认版本,如果没有设置,则开机时默认node是没有启动的。
nvm alias default v10.15.2
# 查看当前使用的版本
nvm current
复制代码
After installing node, the nodejs package manager npm (node package manager) is automatically installed, and then configure the accelerated image:
# 查看npm版本
npm --version
# 查看默认registry
npm config -g get registry
# 配置加速镜像
npm config -g set registry https://registry.npm.taobao.org
复制代码
Finally, install vue:
# 安装命令
npm install -g @vue/cli
npm install -g @vue/cli-init # vue2.x版本需要安装桥接工具
# 安装完成可以查看版本
vue -V
复制代码
2 Vue project creation
Create a vue instance project:
vue create ginessential-vue
复制代码
Then make some choices, as follows:
Then you will be prompted:
cd ginessential-vue
yarn serve
复制代码
exhibit:
Well, the above has shared the method of installing vue and project creation in ubuntu. I hope my sharing can help you a little bit in your study.
【Public number transmission】