Vue 3 創建前端項目


一、 按照node.js 、vue 、vue CLI 具體如何安裝百度有

        安裝了Vue CLI 就可以使用Vue 命令

二、創建項目,有兩種方式 

    1、vue CLI 命令行創建

          vue create 項目名稱,    

 官方給了幾個模板,你也可以選擇最后一個自定義創建

  2 、在命令行輸入 Vue UI  ,可以通過一個WebUrl在瀏覽器上創建

 

 

在功能面板中我們可以選擇安裝哪些主要的功能
①Babel 
  Transpile modern JavaScript to older versions (for compatibility)[講現代JavaScript轉換為舊版本(為了兼容性)]
 
②TypeScript【類型腳本】
Add support for the TypeScript language【添加對typescript語言的支持】
 
③Progressive Web App (PWA) Support
Improve performances with features like Web manifest and Service workers【通過Web manifest和Service worker等特性提高性能】
 
④Router【路由】
Structure the app with dynamic pages【用動態頁面構造應用程序】
 
⑤Vuex
Manage the app state with a centralized store【使用集中存儲管理應用程序狀態】
 
⑥CSS Pre-processors
Add support for CSS pre-processors like Sass, Less or Stylus【添加對CSS預處理器(如Sass、Less或手寫筆)的支持】
 
⑦Linter / Formatter【代碼格式校驗】
Check and enforce code quality with ESLint or Prettier【使用ESLint或Prettier檢查並強制執行代碼質量】
 
⑧Unit Testing
Add a Unit Testing solution like Jest or Mocha【添加單元測試解決方案,如Jest或Mocha】
 
⑨E2E Testing
Add an End-to-End testing solution to the app like Cypress or Nightwatch【向應用程序添加端到端測試解決方案,如Cypress或Nightwatch】
 
⑩使用配置文件
將插件的配置保存在各自的配置文件 (比如 '.babelrc') 中。【把不同的配置單獨的保存】
 
 

 

 

①Use history mode for router? (Requires proper server setup for index fallback in production)【使用路由器的歷史模式?(需要為生產中的索引回退設置正確的服務器)】 【關閉】
②Pick a linter / formatter config: 【選擇一個linter/formatter配置:】 關於ESLint 詳細配置可以查看着個 博客
  ⑴ESLint with error prevention only【ESLint僅具有錯誤預防功能】
  ⑵ESLint + Airbnb config【ESLint+Airbnb配置】
  ⑶ESLint + Standard config【ESLint+標准配置】【(不知道怎么選可以選擇這個)】
  ⑷ESLint + Prettier【ESLint+更漂亮】
Checking code errors and enforcing an homogeoneous code style is recommended.【建議檢查代碼錯誤並強制使用相同的代碼樣式。】
③Pick additional lint features:【選擇其他絨布功能:】
  ⑴Lint on save【按下 Ctrl+S 就會對格式進行校驗】【(選擇這個)】
  ⑵Lint and fix on commit (requires Git)【】
 
選擇好后 會彈出一個保存新預設的彈框 如果想要存的話就輸入 不想保存的話直接跳過就可以了
 
其他的:
安裝國際化插件  cd 項目目錄,    vue add i18n
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM