vue的学习记录--环境配置
来源:互联网 发布:sql where and 编辑:程序博客网 时间:2024/06/05 11:52
一、vue的环境布置(mac电脑)
1.安装 Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
在终端直接输入上面这段代码,然后回车,如果返回400的错误提示,建议翻一下墙,即可解决。
Homebrew 的简单使用
搜索软件:brew search 软件名,如brew search wget安装软件:brew install 软件名,如brew install wget卸载软件:brew remove 软件名,如brew remove wget
更多详细操作到官网查询 http://brew.sh/index_zh-cn.html
2.安装 nodejs
brew install nodejs
回车后,即可安装最新版的node,如果要安装指定版本的node,则输入
brew install homebrew/versions/node(xx版本号)
接着查看有没有安装好
node -v
还可以查看一下 npm 有没有安装好
npm -v
在这里顺便把 淘宝的镜像 cnpm 安装好
npm install -g cnpm --registry=https://registry.npm.taobao.org
如果要卸载node,则输入
brew uninstall node
3.安装 vue
cnpm install vue
安装好之后,接着安装 vue-cli
cnpm install -g vue-cli
安装完成之后,输入 vue -V(注意 V 是大写)
vue -V
能正常显示出版本号,表示安装成功
接下来我们需要指定一个目录存放我们的项目,可以选择任意路径,确定好路径后输入下面的命令
vue init webpack "项目名称"
此时会一些设置选项填写,根据自身需求进行填写
? Project name my-project? Project description test vue and webpack? Author goAhead-jz? Vue build standalone? Install vue-router? No? Use ESLint to lint your code? No? Setup unit tests with Karma + Mocha? No? Setup e2e tests with Nightwatch? No
成功以后,我们进入项目所在目录
cd "项目所在文件夹"
然后依次输入下面的命令
npm installnpm run dev
当出现下图时,说明已经配置完成
进入项目目录,config>index.js,把 8080 端口修改成一个不常用的端口
阅读全文
0 0
- vue的学习记录--环境配置
- vue的学习记录-例题
- vue-cnodejs学习-目录创建 环境配置
- vue学习记录 vue-router
- vue vue-router vue-resource学习记录
- hadoop学习2 记录配置hadoop环境的那些坑
- vue+webpack学习记录
- vue 学习记录
- Vue.js学习记录
- vue 学习记录
- vue 学习记录
- vue学习进度记录
- vue.js环境配置
- vue.js 环境配置
- vue.js环境配置
- VUE环境配置
- 配置Vue开发环境
- Vue.js环境配置
- 存储技术SAN、NAS、NFS、DAS、RAW、文件系统、ASM、Exadata、HDFS、LVM、RAID、LUN、Samba
- 基于item协同过滤算法实现
- ViewPager的刷新以及复用
- tomcat7.x 点击\bin\tomcat7.exe一闪而过,点击tomcat7w.exe提示未安装服务
- 《所谓情商高就是会说话》
- vue的学习记录--环境配置
- HDU 4686(矩阵快速幂)
- TI DSP C64X 优化基本方法
- JS动态实现:每个h2后添加top回到顶部
- Css精灵图合成工具---CssSprite
- 35、不一样的C++系列--智能指针
- 将tableview中显示的内容导出到EXCEL中
- Python编程之安装
- C# 线程中更新界面控件