Skip to content

Commit 11ccf64

Browse files
dhenscheyyx990803
authored andcommitted
feat: support custom initial commit message (#1116)
1 parent 739424d commit 11ccf64

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/@vue/cli/bin/vue.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ program
3939
.option('-p, --preset <presetName>', 'Skip prompts and use saved or remote preset')
4040
.option('-d, --default', 'Skip prompts and use default preset')
4141
.option('-i, --inlinePreset <json>', 'Skip prompts and use inline JSON string as preset')
42+
.option('-g, --initialCommit <message>', 'Specify initial commit message (when git is available)')
4243
.option('-m, --packageManager <command>', 'Use specified npm client when installing dependencies')
4344
.option('-r, --registry <url>', 'Use specified npm registry when installing dependencies (only for npm)')
4445
.option('-f, --force', 'Overwrite target directory if it exists')

packages/@vue/cli/lib/Creator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ module.exports = class Creator {
164164
await run('git', ['config', 'user.name', 'test'])
165165
await run('git', ['config', 'user.email', 'test@test.com'])
166166
}
167-
await run(`git commit -m init`)
167+
await run('git', ['commit', '-m', cliOptions.initialCommit || 'init'])
168168
}
169169

170170
// log instructions

0 commit comments

Comments
 (0)