Closed SandraAhlgrimm closed 2 years ago
It could be a good idea and it won't impact existing projects which don't use GitHub Codespaces, so it can be generated by default
@SandraAhlgrimm : can you post an example of this file?
This should create a .devcontainer.json
for the generated project and not development of jhipster itself, right?
Yes. For the generated project. I am currently working on having one for the default options to discuss.
I am experimenting with a jhipster generated project with all settings left as default here:
https://github.com/SandraAhlgrimm/jhipster-sample-devcontainer/tree/main/.devcontainer
@pascalgrimaud
Thanks @SandraAhlgrimm It looks pretty simple and could be generated by default in generated JHipster projects
Great. I'll go ahead and propose a PR
Opened draft pull request here #17792 Looking forward to your review and comments!
@pascalgrimaud @atomfrede
Since the change is quite independent, can this be included in a separate subgen or as a module or behind a flag?
@vishal423 : it was originaly suggested by @jdubois as I know he uses codespaces. Then, as it's in a .folder I don't think it impacts our user, we can have it by default, it's not a problem
Having it hidden in a subgen or flag would exclude a lot of users, especially beginners, who would benefit the most from this feature to setup your dev environment right away. Of course, it can be enhanced with more smartness so that database extensions, etc. are also included if they're chosen within the generator.
I would also live a .devcontainer for the JHipster generator repository itself to automatically install supported java and npm version when I want to contribute to JHipster
Overview of the feature request
Adding devcontainers will enable jhipster users to use GitHub Codespaces or VS Code with well configured out of the box.
A devcontainer.json file in your project tells VS Code how to access (or create) a development container with a well-defined tool and runtime stack. This container can be used to run an application or to sandbox tools, libraries, or runtimes needed for working with a codebase. Find more in the official documentation here.
Motivation for or Use Case
Related issues or PR
none