使用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)
| 目錄 | 說明 |
|---|---|
| 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í)候生成一份文件,用來記錄當(dāng)前狀態(tài)下實(shí)際安裝的各個(gè)npm package的具體來源和版本號(hào)。 |
| babel.config.js | babel配置 Babel 是一個(gè)工具鏈,主要用于將采用 ECMAScript 2015+ 語法編寫的代碼轉(zhuǎn)換為向后兼容的 JavaScript 語法,以便能夠運(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 | 入口頁面 |

項(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)目內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
vue中Vue.set()的使用以及對(duì)其進(jìn)行深入解析
vue不允許在已經(jīng)創(chuàng)建的實(shí)例上動(dòng)態(tài)添加新的根級(jí)響應(yīng)式屬性,不過可以使用Vue.set()方法將響應(yīng)式屬性添加到嵌套的對(duì)象上,下面這篇文章主要給大家介紹了關(guān)于vue中Vue.set()的使用以及對(duì)其進(jìn)行深入解析的相關(guān)資料,需要的朋友可以參考下2023-01-01
vue打包后dist文件在本地啟動(dòng)運(yùn)行的步驟
這篇文章主要給大家介紹了關(guān)于vue打包后dist文件在本地啟動(dòng)運(yùn)行的簡(jiǎn)單步驟,文中通過代碼示例以及圖文介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用vue具有一定的參考價(jià)值,需要的朋友可以參考下2023-09-09
vue實(shí)現(xiàn)GitHub的第三方授權(quán)方法示例
本文主要介紹了vue實(shí)現(xiàn)GitHub的第三方授權(quán),文中通過示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2021-11-11
Vue設(shè)置長時(shí)間未操作登錄自動(dòng)到期返回登錄頁
這篇文章主要介紹了Vue設(shè)置長時(shí)間未操作登錄以后自動(dòng)到期返回登錄頁,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),需要的朋友可以參考下2020-01-01

