Skip to content

feat(cli): git auto initialization on creation#8800

Closed
IlCallo wants to merge 3 commits into
quasarframework:vue3-workfrom
IlCallo:git-auto-initialize
Closed

feat(cli): git auto initialization on creation#8800
IlCallo wants to merge 3 commits into
quasarframework:vue3-workfrom
IlCallo:git-auto-initialize

Conversation

@IlCallo
Copy link
Copy Markdown
Member

@IlCallo IlCallo commented Apr 6, 2021

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Documentation
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch and not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on a Electron app
  • Any necessary documentation has been added or updated in the docs (for faster update click on "Suggest an edit on GitHub" at bottom of page) or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
Needs quasarframework/quasar-starter-kit#150, quasarframework/quasar-starter-kit-app-extension#18 and quasarframework/quasar-starter-kit-ui#53 to work.
As discussed into quasarframework/quasar-starter-kit#148

This will work only if complete function from the starter kit is a Promise to preserve backwards compatibility with custom starter kits

@IlCallo IlCallo force-pushed the git-auto-initialize branch from e89421b to 6f38be0 Compare April 12, 2021 09:23
@bazuka5801
Copy link
Copy Markdown
Contributor

@IlCallo
Hmm... in some scenarios we create monorepo, and often we initializing repo after creating app, then with this feature we need remember new cli arg + add this on every project that need.
In my opinion, Quasar is framework, non team-work project like github desktop or other git clients.
If we want add this, this should be optional feature with default value false

@IlCallo
Copy link
Copy Markdown
Member Author

IlCallo commented Apr 26, 2021

Sorry, I cannot understand what is the problem, can you provide us an example?
You mean it's a problem for monorepos as you'll get a git initialization for every subproject you create?

Consider that Quasar CLI is pretty much the only one which still doesn't auto initialise a git repo upon project creation.
Eg. Vue CLI and Angular CLI do and let you opt out, this behaviour is the de-facto standard

@bazuka5801
Copy link
Copy Markdown
Contributor

@IlCallo not for every project
ex.

myproject
-> admin
-> app
-> backend
.....

I create project with quasar in app folder, then create repo in root directory (myproject) and push to github

@hawkeye64
Copy link
Copy Markdown
Member

I tend to agree that this should be a question asked to the user, just like the "use yarn or npm". At work, this would have caused issues, because the client is deep inside a mono-repo.

@IlCallo
Copy link
Copy Markdown
Member Author

IlCallo commented Apr 27, 2021

I create project with quasar in app folder, then create repo in root directory (myproject) and push to github

I see... But the vast majority of the community wouldn't follow your workflow, and standards should support the majority.
Again: all major CLI already do this and I'm not aware of complaints, while we had some for not being aligned with that de-facto standard.

I tend to agree that this should be a question asked to the user, just like the "use yarn or npm". At work, this would have caused issues, because the client is deep inside a mono-repo.

Putting it on CLI has technical motivations: I initially implemented it as an option on starter kit, but since we have multiple starter kits, we would need to replicate the same code on all of them, so Razvan asked me to move it in the CLI.

Nested monorepo should surely be supported, what do you think of preventing the git init if we find a .git folder into the current folder ancestors?

@hawkeye64
Copy link
Copy Markdown
Member

I think it is always best to ask the User what they want. Put a question into the project setup questions as only the User will know, at that time, what they need.

@rstoenescu rstoenescu closed this Jun 21, 2021
@rstoenescu rstoenescu deleted the branch quasarframework:vue3-work June 21, 2021 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants