Vue Create 創建一個新項目 命令行創建和視圖創建
開始之前 你可以先
>>:cd desktop[將安裝目錄切換到桌面]
>>:vue -V
:Vue CLI 3.0.0-rc.11
>>:vue create yanxiatingyu
:xxxxx一段英文
>>:y
>>:cd yanxiatingyu
>>:npm run serve
瀏覽器輸入:http://localhost:8080/
假如瀏覽器能夠打開,沒有出現頁面 可能你的端口被占用了。
C:\Users\ruby>vue -V
3.0.0-rc.11
C:\Users\ruby>vue create --help
Usage: create [options] <app-name>
create a new project powered by vue-cli-service
Options:
-p, --preset <presetName> Skip prompts and use saved or remote preset
-d, --default Skip prompts and use default preset
-i, --inlinePreset <json> Skip prompts and use inline JSON string as preset
-m, --packageManager <command> Use specified npm client when installing dependencies
-r, --registry <url> Use specified npm registry when installing dependencies (only for npm)
-g, --git [message] Force git initialization with initial commit message
-n, --no-git Skip git initialization
-f, --force Overwrite target directory if it exists
-c, --clone Use git clone when fetching remote preset
-x, --proxy Use specified proxy when creating project
-b, --bare Scaffold project without beginner instructions
-h, --help output usage information
用法:create [options] <app-name>
創建一個由 `vue-cli-service` 提供支持的新項目
選項:
-p, --preset <presetName> 忽略提示符並使用已保存的或遠程的預設選項
-d, --default 忽略提示符並使用默認預設選項
-i, --inlinePreset <json> 忽略提示符並使用內聯的 JSON 字符串預設選項
-m, --packageManager <command> 在安裝依賴時使用指定的 npm 客戶端
-r, --registry <url> 在安裝依賴時使用指定的 npm registry (僅用於 npm 客戶端)
-g, --git [message] 強制 / 跳過 git 初始化,並可選的指定初始化提交信息
-n, --no-git 跳過 git 初始化
-f, --force 覆寫目標目錄可能存在的配置
-c, --clone 使用 git clone 獲取遠程預設選項
-x, --proxy 使用指定的代理創建項目
-b, --bare 創建項目時省略默認組件中的新手指導信息
-h, --help 輸出使用幫助信息
圖形化界面的使用
通過 vue ui 命令以圖形化界面創建和管理項目:
C:\Users\ruby>vue ui
🚀 Starting GUI...
🌠 Ready on http://localhost:8001
瀏覽器會自動打開。
同理假如瀏覽器打開但是沒有頁面出現,可能端口被占用了啊
假如您要在:Desktop 上面您可以在啟動gui 之前
cd desktop 這樣在ui 中就不用再設置了。
好的 一起來看看 ,GUI下如何安裝吧!