vue项目创建

网上提供了好几种方法,使用NPM 方法比较快,而且还很方便

1.安装node.js

使用淘宝的镜像,在windows命令行中执行命令npm install -g cnpm --registry=https://registry.npm.taobao.org

检查是否安装成功使用node -v

2.安装vue-cli

cnpm install vue-cli -g

检查环境是否安装上:vue -V

3.创建vue项目

3.1 vue init webpack vue_demo(创建名字为‘vue_demo’的文件夹)

? Project name vue_demo

? Project description A Vue.js project

? Author maguoyu

? Vue build standalone

? Install vue-router? Yes

? Use ESLint to lint your code? No

? Set up unit tests No

? Setup e2e tests with Nightwatch? No

? Should we run `npm install` for you after the project has been created? (recommended) npm

………

 

Documentation can be found at https://vuejs-templates.github.io/webpack

3.2  然后进入此文件夹:cd vue_demo

3.3 然后手动下载:cnpm install

√ Installed 37 packages

√ Linked 0 latest versions

√ Run 0 scripts

√ All packages installed (used 67ms(network 56ms), speed 0B/s, json 0(0B), tarball 0B)

3.4最后运行程序:npm run dev    

> [email protected] dev D:\study\vue\vue_demo

> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 

13% building modules 27/31 modules 4 active ...x=0!D:\study\vue\vue_demo\src\App.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.

95% emitting

 

DONE Compiled successfully in 3725ms 14:50:13

 

I Your application is running here: http://localhost:8080

4.访问项目: http://localhost:8080

 

你可能感兴趣的:(vue项目创建)