使用idea創(chuàng)建第一個(gè)Vue項(xiàng)目
創(chuàng)建項(xiàng)目



創(chuàng)建項(xiàng)目之后:自動(dòng)編譯
sr/local/bin/node /usr/local/lib/node_modules/npm/bin/npx-cli.js --yes --package @vue/cli vue create --default . npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated graphql-extensions@0.15.0: The `graphql-extensions` API has been removed from Apollo Server 3. Use the plugin API instead: https://www.apollographql.com/docs/apollo-server/integrations/plugins/ npm WARN deprecated apollo-tracing@0.15.0: The `apollo-tracing` package is no longer part of Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#tracing for details npm WARN deprecated apollo-cache-control@0.14.0: The functionality provided by the `apollo-cache-control` package is built in to `apollo-server-core` starting with Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#cachecontrol for details. npm WARN deprecated subscriptions-transport-ws@0.9.19: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md npm WARN deprecated graphql-tools@4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead Vue CLI v5.0.3 ? Generate project in current directory? Yes Vue CLI v5.0.3 ? Creating project in /Users/gaoxinfu/Github/gaoxinfu/vue-sample. ?? Initializing git repository... ?? Installing CLI plugins. This might take a while... added 859 packages in 46s ?? Invoking generators... ?? Installing additional dependencies... added 97 packages in 12s ? Running completion hooks... ?? Generating README.md... ?? Successfully created project vue-sample. ?? Get started with the following commands: $ npm run serve Done
創(chuàng)建項(xiàng)目之后:初始項(xiàng)目架構(gòu)
| 目錄 | 說(shuō)明 |
|---|---|
| node_modules | 依賴包文件夾 |
| public | |
| src | |
| src/routes | 前端路由 |
| src/assets | css、image、svg等資源 |
| src/components | 編寫vue代碼的文件夾,具體vue的文件都放在這里一般 |
| package.json | npm配置 參考 https://juejin.cn/post/6870426598605062152 |
| pachage-lock.json | 1、鎖定安裝時(shí)的包的版本號(hào),需要上傳到git,保證大家的依賴包一致。2、package-lock.json 是在 npm install時(shí)候生成一份文件,用來(lái)記錄當(dāng)前狀態(tài)下實(shí)際安裝的各個(gè)npm package的具體來(lái)源和版本號(hào)。 |
| babel.config.js | babel配置 Babel 是一個(gè)工具鏈,主要用于將采用 ECMAScript 2015+ 語(yǔ)法編寫的代碼轉(zhuǎn)換為向后兼容的 JavaScript 語(yǔ)法,以便能夠運(yùn)行在當(dāng)前和舊版本的瀏覽器或其他環(huán)境中 ,可以參考label的介紹 https://www.babeljs.cn/docs/ |
| jsconfig.json | 目錄中出現(xiàn) jsconfig.json 文件表明該目錄是 JavaScript 項(xiàng)目的根目錄 文件目錄檢索做智能提示 |
| README.md | 項(xiàng)目介紹 |
| index.html | 入口頁(yè)面 |

項(xiàng)目啟動(dòng)
方式1


方式2:npm run serve
gaoxinfudeMacBook-Pro:vue-sample gaoxinfu$ npm run serve > vue-sample@0.1.0 serve > vue-cli-service serve INFO Starting development server... DONE Compiled successfully in 3048ms 9:28:14 PM App running at: - Local: http://localhost:8081/ - Network: http://192.168.0.198:8081/ Note that the development build is not optimized. To create a production build, run npm run build.
到此這篇關(guān)于使用idea創(chuàng)建第一個(gè)Vue項(xiàng)目的文章就介紹到這了,更多相關(guān)idea創(chuàng)建Vue項(xiàng)目?jī)?nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
vue 監(jiān)聽是否切屏和開啟小窗的實(shí)現(xiàn)過(guò)程
這篇文章主要介紹了vue 監(jiān)聽是否切屏和開啟小窗的過(guò)程,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2023-04-04
vue登錄頁(yè)面設(shè)置驗(yàn)證碼input框的方法
這篇文章主要為大家詳細(xì)介紹了vue登錄頁(yè)面設(shè)置驗(yàn)證碼input框的方法,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-04-04
vue2.0+SVG實(shí)現(xiàn)音樂(lè)播放圓形進(jìn)度條組件
這篇文章主要為大家詳細(xì)介紹了Vue2.0+SVG實(shí)現(xiàn)音樂(lè)播放圓形進(jìn)度條組件,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2019-09-09
vue.js實(shí)現(xiàn)插入數(shù)值與表達(dá)式的方法分析
這篇文章主要介紹了vue.js實(shí)現(xiàn)插入數(shù)值與表達(dá)式的方法,結(jié)合實(shí)例形式分析了vue.js常見的3種插入數(shù)值實(shí)現(xiàn)方式,并總結(jié)了vue.js插值與表達(dá)式相關(guān)使用技巧,需要的朋友可以參考下2018-07-07
Ant Design編寫登錄和注冊(cè)頁(yè)面的教程
這篇文章主要介紹了Ant Design編寫登錄和注冊(cè)頁(yè)面的教程,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-04-04

