我是靠谱客的博主 繁荣樱桃,这篇文章主要介绍Vue 安装及使用,现在分享给大家,希望可以做个参考。

Vue 安装

使用 npm 安装 vue:

npm install vue -g --registry=https://registry.npm.taobao.org

使用 npm 安装 vue-cli:

# 全局安装 vue-cli
npm install --global vue-cli -g --registry=https://registry.npm.taobao.org

体验Vue项目

执行

# 创建一个基于 webpack 模板的新项目
vue init webpack my-project

vue-cli · Generated "my-project".
To get started:
cd my-project
npm install
npm run dev

命令后,就可http://localhost:8080/访问了。

Build Setup

# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test

更多资料

vuejs中文官方文档

Vue.js 入门教程

最后

以上就是繁荣樱桃最近收集整理的关于Vue 安装及使用的全部内容,更多相关Vue内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(126)

评论列表共有 0 条评论

立即
投稿
返回
顶部