欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

使用vue-cli webpack 快速搭建項目的代碼

 更新時間:2018年11月21日 09:44:27   作者:color_小浣熊  
這篇文章主要介紹了vue-cli webpack 快速搭建項目的教程詳解,本文通過實例代碼給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下

一、安裝vue

npm install vue -g

二、用vue-cli快速搭建項目

//全局安裝vue-cli
npm install install -g vue-cli
//創(chuàng)建一個基于webpack模板的項目
vue init webpack [demoname]
? Project name (xxx)
? Project name xxxx
? Project description (A Vue.js project)
? Project description A Vue.js project
? Author (xj <x@xm.com>)
? Author xx <x@xlm.com>
? Vue build (Use arrow keys)
? Vue build standalone
? Install vue-router? (Y/n) y
? Install vue-router? Yes
? Use ESLint to lint your code? (Y/n) n
? Use ESLint to lint your code? No
? Set up unit tests (Y/n) n
? Set up unit tests No
? Setup e2e tests with Nightwatch? (Y/n) n
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recom
? Should we run `npm install` for you after the project has been created? (recom
mended) npm
  vue-cli · Generated "paixiaoyang_backstage".
# 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 andnew 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 F:\work\paixiaoyang_backstage\paixiaoyang_backstage\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 1127 packages from 646 contributors and audited 10642 packages in 157.659s
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 xxxx
 npm run dev
Documentation can be found at https://vuejs-templates.github.io/webpack

三、進入項目運行

cd xxxx
//運行
npm run dev


四、在瀏覽器上打開localhost:8080

總結(jié)

以上所述是小編給大家介紹的使用vue-cli webpack 快速搭建項目的代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關(guān)文章

  • 一文詳解vue-router中的導(dǎo)航守衛(wèi)

    一文詳解vue-router中的導(dǎo)航守衛(wèi)

    vue-router提供的導(dǎo)航守衛(wèi)主要用來通過跳轉(zhuǎn)或取消的方式守衛(wèi)導(dǎo)航,在 vue-router 中,導(dǎo)航守衛(wèi)是一種非常重要的功能,所以本文將詳細講解一下vue-router中的導(dǎo)航守衛(wèi),感興趣的同學跟著小編一起來看看吧
    2023-07-07
  • 詳解van-cell如何使用插槽

    詳解van-cell如何使用插槽

    這篇文章主要為大家介紹了van-cell如何使用插槽詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2023-12-12
  • 深入淺析Vue.js計算屬性和偵聽器

    深入淺析Vue.js計算屬性和偵聽器

    這篇文章主要介紹了Vue.js計算屬性和偵聽器的相關(guān)資料,非常不錯,具有參考借鑒價值,需要的朋友可以參考下
    2018-05-05
  • vue項目前端知識點整理【收藏】

    vue項目前端知識點整理【收藏】

    本文是小編給大家收藏整理的關(guān)于vue項目前端知識點,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下
    2019-05-05
  • vue3項目中各個文件的作用詳細介紹

    vue3項目中各個文件的作用詳細介紹

    在Vue3項目中,通常會有以下一些常見的目錄和文件,下面這篇文章主要給大家介紹了關(guān)于vue3項目中各個文件的作用,文中通過代碼介紹的非常詳細,需要的朋友可以參考下
    2024-09-09
  • 基于element-ui封裝表單金額輸入框的方法示例

    基于element-ui封裝表單金額輸入框的方法示例

    這篇文章主要介紹了基于element-ui封裝表單金額輸入框的方法示例,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2021-01-01
  • vue本地打開build后生成的dist文件夾index.html問題

    vue本地打開build后生成的dist文件夾index.html問題

    這篇文章主要介紹了vue本地打開build后生成的dist文件夾index.html問題,本文給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友參考下吧
    2019-09-09
  • vue.js中實現(xiàn)登錄控制的方法示例

    vue.js中實現(xiàn)登錄控制的方法示例

    這篇文章主要介紹了vue.js中實現(xiàn)登錄控制的方法,結(jié)合實例形式分析 vue.js操作登陸頁面流程控制相關(guān)實現(xiàn)技巧,需要的朋友可以參考下
    2018-04-04
  • axios?發(fā)?post?請求,后端接收不到參數(shù)的完美解決方案

    axios?發(fā)?post?請求,后端接收不到參數(shù)的完美解決方案

    這篇文章主要介紹了axios?發(fā)?post?請求,后端接收不到參數(shù)的解決方案,場景很簡單,就是一個正常 axios post 請求,本文給大家分享問題原因分析及解決方案需要的朋友可以參考下
    2022-12-12
  • IDEA創(chuàng)建Vue項目的兩種方式總結(jié)

    IDEA創(chuàng)建Vue項目的兩種方式總結(jié)

    這篇文章主要介紹了IDEA創(chuàng)建Vue項目的兩種方式總結(jié),具有很好的參考價值,希望對大家有所幫助。
    2023-04-04

最新評論