vue项目实战

本文详细介绍了如何使用Vue CLI快速搭建Vue.js的开发环境,并通过实战演示创建和运行一个基于Webpack模板的Vue项目。从安装Vue CLI到初始化项目,再到运行开发服务器,一步步引导读者掌握Vue项目的构建流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

本文实战为主,没有基础,真正的基础是要从实战开始:::

安集vue集成环境:

npm install -g vue-cli

 

执行vue检查安装情况:


Options:
-V, --version output the version number
-h, --help output usage information

Commands:
init generate a new project from a template
list list available official templates
build prototype a new project
create (for v3 warning only)
help [cmd] display help for [cmd]

查看安装包:vue list

★ browserify - A full-featured Browserify + vueify setup with hot-reload, linting & unit testing.
★ browserify-simple - A simple Browserify + vueify setup for quick prototyping.
★ pwa - PWA template for vue-cli based on the webpack template
★ simple - The simplest possible Vue setup in a single HTML file
★ webpack - A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
★ webpack-simple

说明默认使用了webpack打包

使用webpack模板

执行    vue init webpack sell

会提示安装好多 环境:


C:\Users\Administrator>vue init webpack sell

? Project name sell
? Project description sell app
? Author xsy
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Set up unit tests Yes
? Pick a test runner jest
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recommended) npm

vue-cli · Generated "sell".

 

进入目录   

cd sell

执行安装npm  install

安装好后  npm  run  dev   运行项目

提示下面这个的时候表示,能启用了

 

NE Compiled successfully in 109695ms 09:58:00

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

 

转载于:https://www.cnblogs.com/fgxwan/p/9933449.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值