File tree 2 files changed +2
-1
lines changed
2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ program
63
63
. option ( '-g, --git [message]' , 'Force git initialization with initial commit message' )
64
64
. option ( '-n, --no-git' , 'Skip git initialization' )
65
65
. option ( '-f, --force' , 'Overwrite target directory if it exists' )
66
+ . option ( '--merge' , 'Merge target directory if it exists' )
66
67
. option ( '-c, --clone' , 'Use git clone when fetching remote preset' )
67
68
. option ( '-x, --proxy' , 'Use specified proxy when creating project' )
68
69
. option ( '-b, --bare' , 'Scaffold project without beginner instructions' )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ async function create (projectName, options) {
29
29
exit ( 1 )
30
30
}
31
31
32
- if ( fs . existsSync ( targetDir ) ) {
32
+ if ( fs . existsSync ( targetDir ) && ! options . merge ) {
33
33
if ( options . force ) {
34
34
await fs . remove ( targetDir )
35
35
} else {
You can’t perform that action at this time.
0 commit comments