前端VUE环境构建

  • https://nodejs.org/en/ 安装node 

  

  • 安装淘宝npm镜像

D:\>cd cnpm

D:\cnpm>npm install -g cnpm --registry=https://registry.npm.taobao.org
C:\Users\lbm\AppData\Roaming\npm\cnpm -> C:\Users\lbm\AppData\Roaming\npm\node_modules\cnpm\bin\cnpm
+ [email protected]
added 683 packages from 900 contributors in 33.678s

D:\cnpm>cnpm install --global vue-cli
Downloading vue-cli to C:\Users\lbm\AppData\Roaming\npm\node_modules\vue-cli_tmp
Copying C:\Users\lbm\AppData\Roaming\npm\node_modules\vue-cli_tmp\[email protected]@vue-cli to C:\Users\lbm\AppData\Roaming\npm\node_modules\vue-cli
Installing vue-cli's dependencies to C:\Users\lbm\AppData\Roaming\npm\node_modules\vue-cli/node_modules
[1/20] commander@^2.9.0 installed at node_modules\[email protected]@commander
[2/20] multimatch@^2.1.0 installed at node_modules\[email protected]@multimatch
[3/20] minimatch@^3.0.0 installed at node_modules\[email protected]@minimatch
[4/20] ora@^1.3.0 installed at node_modules\[email protected]@ora
[5/20] rimraf@^2.5.0 existed at node_modules\[email protected]@rimraf
[6/20] chalk@^2.1.0 installed at node_modules\[email protected]@chalk
[7/20] consolidate@^0.14.0 installed at node_modules\[email protected]@consolidate
[8/20] semver@^5.1.0 installed at node_modules\[email protected]@semver
[9/20] [email protected] installed at node_modules\[email protected]@uid
[10/20] tildify@^1.2.0 installed at node_modules\[email protected]@tildify
[11/20] read-metadata@^1.0.0 installed at node_modules\[email protected]@read-metadata
[12/20] user-home@^2.0.0 installed at node_modules\[email protected]@user-home
[13/20] [email protected] existed at node_modules\[email protected]@coffee-script
[14/20] validate-npm-package-name@^3.0.0 installed at node_modules\[email protected]@validate-npm-package-name
[15/20] metalsmith@^2.1.0 installed at node_modules\[email protected]@metalsmith
[16/20] handlebars@^4.0.5 installed at node_modules\[email protected]@handlebars
[17/20] download-git-repo@^1.0.1 installed at node_modules\[email protected]@download-git-repo
[18/20] request@^2.67.0 installed at node_modules\[email protected]@request
[19/20] async@^2.4.0 installed at node_modules\[email protected]@async
[20/20] inquirer@^6.0.0 installed at node_modules\[email protected]@inquirer
deprecate [email protected][email protected] › coffee-script@^1.12.4 CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
Recently updated (since 2019-05-01): 2 packages (detail see file C:\Users\lbm\AppData\Roaming\npm\node_modules\vue-cli\node_modules\.recently_updates.txt)
  Today:
    → [email protected][email protected] › glob@^7.1.3(7.1.4) (08:45:01)
  2019-05-07
    → [email protected] › uglify-js@^3.1.4(3.5.11) (03:37:56)
All packages installed (238 packages installed from npm registry, used 12s(network 12s), speed 444.88kB/s, json 223(409.21kB), tarball 4.75MB)
[[email protected]] link C:\Users\lbm\AppData\Roaming\npm\vue@ -> C:\Users\lbm\AppData\Roaming\npm\node_modules\vue-cli\bin\vue
[[email protected]] link C:\Users\lbm\AppData\Roaming\npm\vue-init@ -> C:\Users\lbm\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-init
[[email protected]] link C:\Users\lbm\AppData\Roaming\npm\vue-list@ -> C:\Users\lbm\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-list

  • 安装vue-cli脚手架
     
  • 新建一个项目
  • 在项目里面安装依赖

猜你喜欢

转载自www.cnblogs.com/liubeimeng/p/10831834.html