Open capaj opened 4 years ago
We do have some git
specific references in the code as well as use of gitignore
in templates and use of git
hooks via Husky, so I think it's reasonable to do so and optimize for the case that is likely the vast majority of usage. Although the first ref is behind an if
statement, gitignore
is harmless, and there's #419 to install without Husky which is very highly requested.
This feature I think will run into the same issue as #419 for monorepos as well as existing repos more generally. So a PR for this should check if already inside a git
repo and only perform git init
if not inside one.
Per https://github.com/formium/tsdx/issues/438#issuecomment-578110253, the eventual plan is to have a command like tsdx add
that allows for easier adoption in existing repos as well as partial adoption of TSDX. So I would probably suggest using that over the flag sprawl that would be various --no
flags for every use-case. create
can be reserved for an opinionated workflow. There are some trade-offs with that too (e.g. how granular is add
?) so there's more to think about on that front though.
Would be nice if tsdx could also run this
git init
command for me while callingtsdx create mylib
. I know there are people out there who use other version control systems, but for them, could we introduce a flag--noGitInit
or something like that?