Vue 使用Vue-Cli 创建Vue项目
安装 node
官网
node -v
安装 @vue/cli
npm install -g @vue/cli
vue 命令
命令 | 作用 |
---|---|
-V / --version | 获取版本信息 |
create [options] | create a new project powered by vue-cli-service |
add [options] [pluginOptions] | install a plugin and invoke its generator in an already created project |
invoke [options] [pluginOptions] | invoke the generator of a plugin in an already created project |
serve [options] [entry] | serve a .js or .vue file in development mode with zero config |
build [options] [entry] | build a .js or .vue file in production mode with zero config |
ui [options] | start and open the vue-cli ui |
init [options] | generate a project from a remote template (legacy API, requires @vue/cli-init) |
config [options] [value] | inspect and modify the config |
创建项目
vue create 项目名
vue init需要额外配置
查看全局模块依赖:
npm ls -g --depth 0 (可以常看但会报错)
移除已安装的全局模块
npm uninstall 模块名 -g 或 yarn global remove 模块名(需要安装yarn)
可在 npmjs.com 搜索模块获取相关信息
内容会不断更新,欢迎批评指正。
分类:
# Vue全家桶
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· winform 绘制太阳,地球,月球 运作规律
· 上周热点回顾(3.3-3.9)