Vue 创建项目

vue

E:\temp>mkdir vuetest

E:\temp>cd vuetest

E:\temp\vuetest>vue init webpack runoob-vue3-test

  Command vue init requires a global addon to be installed.
  Please run npm install -g @vue/cli-init and try again.


E:\temp\vuetest>npm install -g @vue/cli-init

npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
+ @vue/cli-init@4.5.13
added 251 packages from 206 contributors in 43.826s

E:\temp\vuetest>vue init webpack runoob-vue3-test

# 这里需要进行一些配置,默认回车即可

? Project name runoob-vue3-test

? Project description A Vue.js project

? Author runoob <test@runoob.com>

? 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? Yes

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

vue-cli · Generated "runoob-vue3-test".

# Installing project dependencies ...

# ========================

...

$ cd runoob-vue3-test

$ cnpm run dev

DONE Compiled successfully in 2558ms

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

成功执行以上命令后访问 http://localhost:8080/,输出结果如下所示:

ref

https://www.runoob.com/vue3/vue3-install.html



以上是 Vue 创建项目 的全部内容, 来源链接: utcz.com/z/375632.html

回到顶部