t3-oss/create-t3-app

feat: informational message improvements

jamesgeorge007 opened this issue · 6 comments

Is your feature request related to a problem? Please describe.

While scaffolding a project in the current directory, the user sees the following set of messages depending on the context.

Empty directory

image

Non-empty directory

image

Isn't it misleading to say that the current directory already exists? Also, in the latter case, . can be replaced with current directory or the directory name.

Describe the solution you'd like to see

Empty directory

I think it's better to remove the message in this case.

Non-empty directory

. can be replaced with current directory or the directory name.

Describe alternate solutions

N/A

Additional information

I'd be happy to raise a PR once we decide the way to go ahead here 🙌

Isn't it misleading to say that the current directory already exists?

how so?

i personally don't mind using ., as the only way to get to these messages is to type . in the CLI, so the user presumably knows what it means. but will leave this open, maybe everyone else disagrees :)

Hmm maybe? I don't think it's a big deal since this is how we do it for any empty dir - not sure if we need to treat . special?

We will warn you if the directory isn't empty just as we do for any target directory no matter what string resolved to that path.

I think printing out the current dir might be even more confusing since they wrote . - . is what they expect to be used?

Thanks for sharing your thoughts. This seems subjective.

Isn't it misleading to say that the current directory already exists?

My point here was that being in the current directory implicitly conveys that the path exists. Showing a message, in this case, might not be necessary since there isn't a case of non-existence.

Handling the case with . separately

Thought about bringing this up since I've seen a few CLIs following this approach.

  • create-vite

image

  • create-vue

image

Feel free to close if we're not going ahead :)

Thanks for sharing your thoughts. This seems subjective.

Isn't it misleading to say that the current directory already exists?

My point here was that being in the current directory implicitly conveys that the path exists. Showing a message, in this case, might not be necessary since there isn't a case of non-existence.

Handling the case with . separately

Thought about bringing this up since I've seen a few CLIs following this approach.

  • create-vite

image

  • create-vue

image

Feel free to close if we're not going ahead :)

If the directory is not empty we give a similar warning.

I'd be fine with removing the log if its empty for current dir if that's what others do

To confirm that we're aligned here.

  • We're removing the message, . exists but is empty, continuing... while scaffolding in the current directory.
  • Not treating the case with . separately, keeping it as is.

Please let me know if I can go ahead with the PR.

To confirm that we're aligned here.

  • We're removing the message, . exists but is empty, continuing... while scaffolding in the current directory.

  • Not treating the case with . separately, keeping it as is.

Please let me know if I can go ahead with the PR.

I think it should be:
. exists but is empty.... - removed
. is not empty, would you like to... - keep

cc @c-ehrlich @nexxeln ?