MAC系统安装vue
检查node版本
node -v
若找不到node,则需要下载及安装:
https://nodejs.org/en/download/ (选择mac os)
###终端输入:
sudo npm install -g vue-cli
manblue@appledeMacBook-Pro ~ % sudo npm install -g vue-cli
Password:
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)
/usr/local/bin/vue -> /usr/local/lib/node_modules/vue-cli/bin/vue
/usr/local/bin/vue-list -> /usr/local/lib/node_modules/vue-cli/bin/vue-list
/usr/local/bin/vue-init -> /usr/local/lib/node_modules/vue-cli/bin/vue-init
+ vue-cli@2.9.6
added 239 packages from 205 contributors in 67.6s
╭────────────────────────────────────────────────────────────────╮
│ │
│ New major version of npm available! 5.6.0 → 6.12.0 │
│ Changelog: https://github.com/npm/cli/releases/tag/v6.12.0 │
│ Run npm install -g npm to update! │
│ │
╰────────────────────────────────────────────────────────────────╯
manblue@appledeMacBook-Pro ~ % vue
Usage: vue <command> [options]
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]
manblue@appledeMacBook-Pro ~ % vue list
vue-cli · connect ECONNREFUSED 13.250.168.23:443
manblue@appledeMacBook-Pro ~ %
###安装webpack模板,并设置工程信息
输入命令 `vue init webpack front
注释:sell是名称,自己可以随意命名
接下来输入项目名称,项目描述,作者,是否安装路由,是否使用后ES检测器,输入 y,需要,是否需要前端测试库n 不需要,完成。
(django)