博客
关于我
配置vue环境,创建vue项目
阅读量:251 次
发布时间:2019-03-01

本文共 1037 字,大约阅读时间需要 3 分钟。

安装包和详细+简单步骤:

安装js的运行环境 Node.js:

http://nodejs.cn/download/ nodejs 中文官网

  • 选择合适的版本:
    在这里插入图片描述
设置淘宝npm镜像:	npm config set registry https://registry.npm.taobao.org		验证是否成功设置淘宝镜像	npm config get registry		安装淘宝镜像	npm install -g cnpm --registry=https://registry.npm.taobao.org	如果不用淘宝的可以设置回原来的:	npm config set registry https://registry.npmjs.org

版本:

node –v 查看版本 	npm-v  查看版本	cnpm –v 当前cnpm版本	npm install npm@4.6.1 -g  设置到指定版本npm版本
  • 配置全局使用
全局安装vue-cli 脚手架构建工具:npm install -g vue-cli	配置全局加载npm install -g @vue/cli-init
  • 输入命令创建项目,根据提示操作:
输入指令:vue init webpack my-project 		project name  < > 确认项目名,不更改直接回车		project descript  描述,不需要直接回车		Author 作者 输入后回车		vue build 创建vue项目			instll vue-router	是否安装路由		Use ESlint to lint your code 使用ESlint对代码进行lint  n		Set Upt unit tests 是否测试 n		setup e2e test with Nightwatch? 是否测试 n		yes,user NPM  yes,user Yarn no,Iwill handle that myself 选第一个直接回车		进入目录下: cd my-project 		安装依赖: cnpm install 		vue-router 安装路由: cnpm install vue-router --save-dev		生成一个package.json: cnpm init -f 命令来		ps:			用淘宝的镜像为cnpm 没配置淘宝的用 npm 		一定要进入项目下安装否则会报错

转载地址:http://jvnt.baihongyu.com/

你可能感兴趣的文章
Nmap哪些想不到的姿势
查看>>
Nmap扫描教程之Nmap基础知识
查看>>
nmap指纹识别要点以及又快又准之方法
查看>>
Nmap渗透测试指南之指纹识别与探测、伺机而动
查看>>
Nmap端口扫描工具Windows安装和命令大全(非常详细)零基础入门到精通,收藏这篇就够了
查看>>
NMAP网络扫描工具的安装与使用
查看>>
NMF(非负矩阵分解)
查看>>
nmon_x86_64_centos7工具如何使用
查看>>
NN&DL4.1 Deep L-layer neural network简介
查看>>
NN&DL4.3 Getting your matrix dimensions right
查看>>
NN&DL4.7 Parameters vs Hyperparameters
查看>>
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>