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

Support offline template generation with the toolbox #383

Open
BennyDeBock opened this issue Apr 7, 2022 · 1 comment
Open

Support offline template generation with the toolbox #383

BennyDeBock opened this issue Apr 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@BennyDeBock
Copy link
Member

Recently I was stuck at a place with no internet trying to start up a new Vapor project and I got a failed to clone template message from the toolbox. This frustrated me but it got me thinking.

.NET especially and other tools/languages sometimes have offline template generators. I know that is hard to do with Vapor since the template is prone to changing and in a separate repository. But having the option to generate a template while you're working offline would be a great addition to the toolbox.

One way I could see this being achieved with the toolbox is that whenever it clones the template repository, it could store that repository somewhere. And every time you generate a new project, if you'd have no internet connection it'd use that template that's stored to generate your starting template.

The issue with this is that the stored template might get outdated, but a solution to this could be to check (when you do have an internet connection) if the stored template is behind on the main branch, you pull in the new template and replace the old one stored locally.

@BennyDeBock BennyDeBock added the enhancement New feature or request label Apr 7, 2022
@BennyDeBock
Copy link
Member Author

  • copy the template in the home directory
  • use that template
  • on every vapor new command, check if that template is outdated or not
  • replace the template if it's outdated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant