vue-cli에 대한 두 개의 vuej 시작 명령이 있는 이유는?
온라인에서 두 개의 다른 실행 명령을 발견했는데, 이상한 원인인 "Raction has the commands"가 있다.create-react-app <name of app>
, 그러나 vue-cli를 위해 나는 이 두 가지 명령을 찾았다.vue create <name of app>
그리고vue init webpack <name of app>
.
두 명령을 모두 실행한 후 다시 확인해보니 두 명령 모두 웹팩을 포함하고 있지만 구조는 다르게 되어 있었다.첫 번째 것은 다른 사람이 그것을 놓치고 있는 동안 미리 설치된 vuex와 함께 왔다.그러나 두 번째 명령어는 많은 추가 devDependencies를 가지고 있었다.
나는 vue-roouter와 vuex를 통합한 다중 페이지 vuejs 애플리케이션에 적합한 명령이 무엇인지 조금 혼란스러울 뿐이다.
Vue CLI v3의 경우vue create
또는vue ui
앱을 깔다Vue CLI v2의 경우vue init
.
Vue CLI v3가 설치되어 있는 경우에도 계속 사용할 수vue init
레거시 API로 간주되지만:
$ vue --version
3.0.0
$ vue init
Usage: init [options] <template> <app-name>
generate a project from a remote template (legacy API, requires @vue/cli-init)
Options:
-c, --clone Use git clone when fetching remote template
--offline Use cached template
-h, --help output usage information
$ vue create
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
Vue CLI는 버전 3에서 안정적이기 때문에, 나는 당신이 그것을 설치했는지 확인하고, 그리고 그것을 사용할 것이다.vue create
명령인지 아닌지는 모르겠지만vue ui
명령하다그vue ui
아직 베타 버전인데 아직 먹어보지는 않았지만 보기 좋다.자세한 내용은 CLI 웹 사이트를 참조하십시오. https://cli.vuejs.org/
참조URL: https://stackoverflow.com/questions/52106323/why-are-there-two-vuejs-start-commands-for-vue-cli
'programing' 카테고리의 다른 글
munmap_properties(): 잘못된 포인터 (0) | 2022.05.16 |
---|---|
SIGPINPY를 방지하는 방법(또는 올바르게 처리) (0) | 2022.05.16 |
scanf를 사용하여 공백 입력을 허용하려면 어떻게 해야 하는가? (0) | 2022.05.16 |
스트르토크()는 어떻게 그 문자열을 C에서 토큰으로 나누는가? (0) | 2022.05.16 |
VueJS - 감시자의 첫 번째 변경 사항 건너뛰기 (0) | 2022.05.16 |