zoukankan      html  css  js  c++  java
  • Windows下搭建Vue脚手架CLI

    Vue CLI的使用依赖Node.js,先按照Node.js环境。

    //安装环境
    C:\Users\16779>npm install --global vue-cli npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) [ .................] | fetchMetadata: sill resolveWithNewModule decompress-tarbz2@4.1.1 check[ .................] - fetc[ .................] / fetchMetadata: sill resolveWithNewModule os-tm[ .................] | fetchMetadata: sill resolveWC:\Users\16779\AppData\Roaming\npm\vue-init -> C:\Users\16779\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-init C:\Users\16779\AppData\Roaming\npm\vue -> C:\Users\16779\AppData\Roaming\npm\node_modules\vue-cli\bin\vue C:\Users\16779\AppData\Roaming\npm\vue-list -> C:\Users\16779\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-list + vue-cli@2.9.6 added 239 packages from 206 contributors in 116.305s
    //安装好后查看版本 C:\Users\
    16779>vue --version 2.9.6
    //切换到你想要保存项目的路径 C:\Users\
    16779>E: E:\>cd HBuilder E:\HBuilder>cd Vue

    //初始化项目 E:\HBuilder\Vue
    >vue init webpack vue-playlist
    //初始化配置
    'git' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� ? Project name vue-playlist ? Project description Vue ? Author lwj ? Vue build standalone ? Install vue-router? No ? Use ESLint to lint your code? No ? Set up unit tests No ? Setup e2e tests with Nightwatch? No ? Should we run `npm install` for you after the project has been created? (recommended) npm vue-cli · Generated "vue-playlist". //选择安装(等待下载) # Installing project dependencies ... # ======================== npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features! npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. > uglifyjs-webpack-plugin@0.4.6 postinstall E:\HBuilder\Vue\vue-playlist\node_modules\webpack\node_modules\uglifyjs-webpack-plugin > node lib/post_install.js npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) added 1126 packages from 647 contributors and audited 10641 packages in 229.663s found 2 vulnerabilities (1 moderate, 1 high) run `npm audit fix` to fix them, or `npm audit` for details # Project initialization finished! # ======================== To get started: cd vue-playlist npm run dev Documentation can be found at https://vuejs-templates.github.io/webpack //切换到项目安装路径 E:\HBuilder\Vue>cd vue-playlist //运行 E:\HBuilder\Vue\vue-playlist>npm run dev > vue-playlist@1.0.0 dev E:\HBuilder\Vue\vue-playlist > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js 95% emitting DONE Compiled successfully in 3636ms 15:53:00 //访问路径 I Your application is running here: http://localhost:8080

  • 相关阅读:
    每周总结
    5月2日学习日志
    5月1日学习日志
    4月30日学习日志
    4月29日学习日志
    4月28日学习日志
    4月27日学习日志
    每周总结
    vue滚动插件BetterScroll
    vue 获取页面高度
  • 原文地址:https://www.cnblogs.com/lwjQAQ/p/10123646.html
Copyright © 2011-2022 走看看