日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

(1)初始化项目

發布時間:2023/12/19 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 (1)初始化项目 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

2019獨角獸企業重金招聘Python工程師標準>>>

(1)初始化項目

1 使用vue-cli初始化項目

vue init webpack my-renren

得到以下輸出:

? Project name my-renren ? Project description A Vue.js project ? Author neumeng <404879269@qq.com> ? Vue build standalone ? Install vue-router? No ? Use ESLint to lint your code? No? Set up unit tests No ? Setup e2e tests with Nightwatch? No ? Should we run `npm install` for you after the project has been created? (recommended) npmvue-cli · Generated "my-renren".# Installing project dependencies ... # ========================npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features! npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.> uglifyjs-webpack-plugin@0.4.6 postinstall E:\VisualStudioCodeProjects\my-renren\node_modules\webpack\node_modules\uglifyjs-webpack-plugin > node lib/post_install.jsnpm notice created a lockfile as package-lock.json. You should commit this file. npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})added 1126 packages from 646 contributors in 318.991s# Project initialization finished! # ========================To get started:cd my-renrennpm run devDocumentation can be found at https://vuejs-templates.github.io/webpack

得到的目錄結構如下表:

NameDescription
build項目構建(webpack)相關代碼
config配置目錄,包括端口號等。我們初學可以使用默認的。
node_modulesnpm 加載的項目依賴模塊
src這里是我們要開發的目錄,基本上要做的事情都在這個目錄里。
static靜態資源目錄,如圖片、字體等
.babelrcbabel配置文件
.editorconfig編輯器配置文件
.gitignoregit忽略配置文件
.postcssrc.jspostcss配置文件
index.html首頁入口文件
package-lock.json記錄當前狀態下實際安裝的各個npm package的具體來源和版本號
package.json項目配置文件
README.md項目的說明文檔,markdown 格式

其中,src目錄里面包含了幾個目錄及文件:

  • assets:放置一些圖片,如logo等。
  • components:目錄里面放了一個組件文件,可以不用。
  • App.vue: 項目入口文件,我們也可以直接將組件寫這里,而不使用 components 目錄。
  • main.js: 項目的核心文件。

轉載于:https://my.oschina.net/neumeng/blog/2248524

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的(1)初始化项目的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。