Skip to content

Commit a8dc019

Browse files
committed
refactor: fix git initialization on UI variable naming and behaviour
1 parent a3b4649 commit a8dc019

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/@vue/cli-ui/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
"options": {
193193
"label": "Additional options",
194194
"description": "Overwrite target folder if it exists",
195-
"git": "Use custom first initial commit message or skip git initialization",
195+
"git": "Initialize git repository (recommended)",
196196
"gitPlaceholder": "Initial commit message (optional)"
197197
}
198198
},

packages/@vue/cli-ui/src/graphql-api/connectors/projects.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ async function create (input, context) {
283283

284284
const cliOptions = {git: true}
285285
// Git
286-
if (input.skipGit) {
286+
if (!input.enableGit) {
287287
if (!input.gitCommit) {
288-
cliOptions.git = 'false'
288+
cliOptions.git = false
289289
} else {
290290
cliOptions.git = input.gitCommit
291291
}

packages/@vue/cli-ui/src/graphql-api/schema/project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ input ProjectCreateInput {
3737
remote: Boolean
3838
clone: Boolean
3939
save: String
40-
skipGit: Boolean!
40+
enableGit: Boolean!
4141
gitCommit: String
4242
}
4343

packages/@vue/cli-ui/src/views/ProjectCreate.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
</VueSwitch>
9191
<VueInput
9292
v-model="formData.gitCommitMessage"
93-
v-show="formData.git"
93+
v-show="!formData.git"
9494
:placeholder="$t('views.project-create.tabs.details.form.options.gitPlaceholder')"
9595
/>
9696
</VueFormField>
@@ -399,7 +399,7 @@ function formDataFactory () {
399399
return {
400400
folder: '',
401401
force: false,
402-
git: false,
402+
git: true,
403403
gitCommitMessage: '',
404404
packageManager: undefined,
405405
selectedPreset: null,
@@ -525,7 +525,7 @@ export default {
525525
input: {
526526
folder: this.formData.folder,
527527
force: this.formData.force,
528-
skipGit: this.formData.git,
528+
enableGit: this.formData.git,
529529
gitCommit: this.formData.gitCommitMessage,
530530
packageManager: this.formData.packageManager,
531531
preset: this.formData.selectedPreset,

0 commit comments

Comments
 (0)