aicommits icon indicating copy to clipboard operation
aicommits copied to clipboard

Add devcontainer config

Open spenserblack opened this issue 2 years ago • 1 comments

See #22 for previous discussion

This allows potential contributors to work in a GitHub Codespace with minimal setup on their end. They can start a codespace by clicking "Code" in the top-right of the repository's page, switching from the "Local" to the "Codespaces" tab, and then create a new codespace.

The contributors devcontainer will have Node, Typescript, and pnpm pre-installed. Once the container is created, nvm will install the appropriate Node version, and then pnpm i will be executed. Basically, the postCreateCommand will run the project setup in CONTRIBUTING.md for them.

Then, for the sake of convenience, the postAttachCommand will build the project in watch mode.


There are a few useless commits in this PR, so you'd probably want to squash-merge :laughing:

spenserblack avatar Feb 22 '23 14:02 spenserblack

Side note: any interest in using an .editorconfig file?

spenserblack avatar Feb 22 '23 14:02 spenserblack

Thanks for the PR, but I'm not currently interested in adding specific support for GitHub Codespaces/Devcontainers. Maybe in the future when I see more people using it.

privatenumber avatar Apr 02 '23 04:04 privatenumber

adding specific support for GitHub Codespaces/Devcontainers

Just to clarify, this PR isn't for adding aicommits to a devcontainer. This allows maintainers or outside contributors to set up a devcontainer to develop aicommits. Otherwise users who don't have a dev environment set up locally and would prefer using Codespaces (like me 🙂) might diverge from the recommended contributing guide. The default codespace container will run npm install, for example. Just double-checking since "adding support" could have more than one meaning 🙂

Side note: you might want to add package-lock.json and yarn.lock to your gitignore to avoid PRs that accidentally commit those other lock files.

spenserblack avatar Apr 02 '23 20:04 spenserblack

Yeah, I understand. Thanks for clarifying. I don't think the need for it has come up so far (e.g. this PR hasn't gotten traction like other PRs, and no one has submitted the wrong lock file.).

privatenumber avatar Apr 02 '23 22:04 privatenumber