Skip to content

Commit

Permalink
feat(create-remix): add --overwrite flag (#7062)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Dalgleish <[email protected]>
  • Loading branch information
brophdawg11 and markdalgleish authored Aug 22, 2023
1 parent 68055c4 commit 23544d3
Show file tree
Hide file tree
Showing 9 changed files with 497 additions and 222 deletions.
7 changes: 7 additions & 0 deletions .changeset/create-remix-overwrite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"create-remix": minor
---

Remove empty directory checking in favor of `overwrite` prompt/flag.

`create-remix` now allows you to write into an existing non-empty directory. It will perform a file-level comparison and if the template will overwrite any existing files in the destination directory, it will prompt you if it's OK to overwrite those files. If you answer no (the default) then it will exit without copying any files. You may skip this prompt with the `--overwrite` CLI flag.
4 changes: 4 additions & 0 deletions docs/other-api/create-remix.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ To create a new project from a template in a private GitHub repo, pass the `--to
</docs-info>
</aside>

### `create-remix --overwrite`

If `create-remix` detects any file collisions between the template and the directory you are creating your app in, it will prompt you for confirmation that it's OK to overwrite those files with the template versions. You may skip this prompt with the `--overwrite` CLI flag.

[templates]: ../pages/templates
Loading

0 comments on commit 23544d3

Please sign in to comment.