Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: do git init with create command #755

Open
capaj opened this issue Jul 9, 2020 · 2 comments
Open

Feature request: do git init with create command #755

capaj opened this issue Jul 9, 2020 · 2 comments
Labels
kind: feature New feature or request PR welcome scope: templates Related to an init template, not necessarily to core (but could influence core)

Comments

@capaj
Copy link

capaj commented Jul 9, 2020

Would be nice if tsdx could also run this git init command for me while calling tsdx 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?

@capaj capaj changed the title Feature request: do git init if the current folder is not a git repo Feature request: do git init with create command Jul 9, 2020
@agilgur5 agilgur5 added the kind: feature New feature or request label Jul 14, 2020
@agilgur5
Copy link
Collaborator

agilgur5 commented Jul 15, 2020

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 #438 (comment), 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.

@agilgur5 agilgur5 added the scope: templates Related to an init template, not necessarily to core (but could influence core) label Aug 19, 2020
@agilgur5
Copy link
Collaborator

Related: facebook/create-react-app#8280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New feature or request PR welcome scope: templates Related to an init template, not necessarily to core (but could influence core)
Projects
None yet
Development

No branches or pull requests

2 participants