使用idea創(chuàng)建第一個(gè)Vue項(xiàng)目
更新時(shí)間:2022年03月24日 08:44:56 作者:東山富哥
最近在學(xué)習(xí)vue,本文主要介紹了使用idea創(chuàng)建第一個(gè)Vue項(xiàng)目,文中根據(jù)圖文介紹的十分詳盡,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
創(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)文章
vue3?騰訊地圖設(shè)置簽到范圍并獲取經(jīng)緯度的實(shí)現(xiàn)代碼
本文給大家介紹vue3?騰訊地圖設(shè)置簽到范圍并獲取經(jīng)緯度的實(shí)現(xiàn)代碼,本文通過(guò)示例代碼給大家介紹的非常詳細(xì),感興趣的朋友跟隨小編一起看看吧2022-05-05vue項(xiàng)目設(shè)置scrollTop不起作用(總結(jié))
這篇文章主要介紹了vue項(xiàng)目設(shè)置scrollTop不起作用(總結(jié)),小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2018-12-12vue+video.js視頻播放、視頻切換、視頻斷點(diǎn)分段上傳功能
本次需求是做一個(gè)視頻列表,點(diǎn)擊視頻列表播放對(duì)應(yīng)視頻;同時(shí)要求實(shí)現(xiàn)斷點(diǎn)分段上傳大文件(視頻)的功能,今天通過(guò)本文給大家講解下vue+video.js視頻播放、視頻切換、視頻斷點(diǎn)分段上傳功能,感興趣的朋友一起看看吧2022-12-12vue router2.0二級(jí)路由的簡(jiǎn)單使用
這篇文章主要為大家詳細(xì)介紹了vue router2.0二級(jí)路由的簡(jiǎn)單使用,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-07-07