VUE
安装 Vue
- 首先要先安装 node 及 npm
安装node 及相关配置
在开始之前首先要确定你的 node、npm 已经安装好
我们可以在命令行中 输入 【node --version 】 查看node版本 【npm --version】查看npm版本
如果都能输出他们的版本号 及说明 node 和npm 安装成功 - 安装Vue
在 Vue 官网 与 Vue.js 中对安装做出了详细介绍
创建一个 Vue 项目
到目标目录运行:vue init webpack
Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6
PS D:\IT\moviesvue> vue init webpack moviesvue
? Project name moviesvue //创建项名称
? Project description //项目描述
? Author kfxkje <1018910361@qq.com> //作者
? Vue build standalone //vue独立生成
? Install vue-router? Yes //安装vue路由器?
? Use ESLint to lint your code? No //使用ESLint来lint您的代码?
? Set up unit tests No //设置单元测试
? Setup e2e tests with Nightwatch? No //设置e2e测试?
? Should we run `npm install` for you after the project has been created? (recommended) no //项目创建后,我们是否应该为您运行“npm install”?
vue-cli · Generated "moviesvue".
# Project initialization finished!
# ========================
To get started:
cd moviesvue
npm install (or if using yarn: yarn)
npm run dev
Documentation can be found at https://vuejs-templates.github.io/webpack
PS D:\IT\moviesvue> cnpm install
PS D:\IT\moviesvue> npm run dev
> moviesvue@1.0.0 dev D:\IT\moviesvue
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
13% building modules 33/36 modules 3 active ...viesvue\src\components\HelloWorld.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
95% emitting
DONE Compiled successfully in 1687ms 下午2:36:12
I Your application is running here: http://localhost:8080