vue create <Project Name> //文件名 不支持駝峰(含大寫字母)
選擇手動(dòng)后需要選擇配置項(xiàng):
> ? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection)
(*) Choose Vue version灿意。 // 選擇vue版本
(*) Babel //轉(zhuǎn)碼器,可以將ES6代碼轉(zhuǎn)為ES5代碼,從而在現(xiàn)有環(huán)境執(zhí)行琐谤。
(*) TypeScript// TypeScript是一個(gè)JavaScript(后綴.js)的超集(后綴.ts)包含并擴(kuò)展了 JavaScript 的語法寨闹,需要被編譯輸出為 JavaScript在瀏覽器運(yùn)行刹碾,目前較少人再用
( ) Progressive Web App (PWA) Support// 漸進(jìn)式Web應(yīng)用程序
(*) Router // vue-router(vue路由)
(*) Vuex // vuex(vue的狀態(tài)管理模式)
(*) CSS Pre-processors // CSS 預(yù)處理器(如:less授瘦、sass)
( ) Linter / Formatter // 代碼風(fēng)格檢查和格式化(如:ESlint)
( ) Unit Testing // 單元測試(unit tests)
( ) E2E Testing // e2e(end to end) 測試
? Use class-style component syntax? Yes 是否使用class風(fēng)格的組件語法:
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? Yes 是否使用babel做轉(zhuǎn)義
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes 路由器使用歷史模式?
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Less 選擇一個(gè)CSS預(yù)處理器
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files 您喜歡在哪里放置Babel、ESLint等的配置叉瘩。膳帕?在專用配置文件中
? Save this as a preset for future projects? No 是否將此保存為將來項(xiàng)目的預(yù)設(shè)