Vue(1) : Vue项目入门

1、先安装nodejs环境

查看官文


2、切换到国内源

镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在):

1.通过config命令

npm config set registry https://registry.npm.taobao.org
npm info underscore (如果上面配置正确这个命令会有字符串response)
2.命令行指定

npm –registry https://registry.npm.taobao.org info underscore
3.编辑 ~/.npmrc 加入下面内容

registry = https://registry.npm.taobao.org
搜索镜像: https://npm.taobao.org

建立或使用镜像,参考: https://github.com/cnpm/cnpmjs.org
4.使用cnpm
npm install cnpm -g –registry=https://registry.npm.taobao.org

执行成功后,执行如下命令下载依赖

cnpm install

依赖包下载完成后,执行如下命令启动项目

cnpm run dev

创建工程

vue init webpack projectName


3. Yarn安装

1 、npm install -g yarn 安装yarn
2、yarn config set registry “https://registry.npm.taobao.org” 设置代理
3、进入到项目目录下执行
yarn install
yarn run dev

https://github.com/taylorchen709/vue-admin
http://vue.tigerb.cn/#/


4. 国内优秀npm镜像

淘宝npm镜像
搜索地址:http://npm.taobao.org/
registry地址:http://registry.npm.taobao.org/

cnpmjs镜像
搜索地址:http://cnpmjs.org/
registry地址:http://r.cnpmjs.org/

配置npm的registry方法,以淘宝npm镜像举例:

4.1.临时使用

npm –registry https://registry.npm.taobao.org install express

4.2.持久使用

npm config set registry https://registry.npm.taobao.org

// 配置后可通过下面方式来验证是否成功
npm config get registry
// 或
npm info express

4.3.通过cnpm使用

npm install -g cnpm –registry=https://registry.npm.taobao.org
// 使用
cnpm install express


5. 适合初学者的开源Vue项目

vue-material
muse-ui
vue2-manage
vue2-elm
webapp
vue-jd
MissCloudVue
VueCnodeJS
tong2-family
vue-admin
easy-vue


6. 推荐IDE

  1. WebStrom
  2. Atom
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AndroidKt

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值