github代码_GitHub代码空间如何提高生产力和降低障碍

github代码

Codespaces, the most recent integration between Visual Studio Code and GitHub, can help make development accessible and welcoming!

代码空间是Visual Studio Code与GitHub之间的最新集成,可帮助使开发变得容易访问和欢迎!

Now in beta, GitHub Codespaces provide an online, in-the-browser IDE powered by Visual Studio Code. This lets you use this full-featured IDE — complete with extensions, terminal, Git commands, and all the settings you’re accustomed to — on any machine. You can now bring your development workflow anywhere using a tablet or other browser-based device.

GitHub Codespaces现在处于测试阶段,提供了一个由Visual Studio Code支持的在线浏览器IDE。 这样,您就可以在任何计算机上使用此功能齐全的IDE(包括扩展,终端,Git命令以及您习惯的所有设置)。 现在,您可以使用平板电脑或其他基于浏览器的设备将开发工作流程带到任何地方。

This is great news for open-source contributors too. Adding a codespace configuration to your project is a great way to invite new folks to easily start contributing.

对于开源贡献者来说,这也是个好消息。 您的项目中添加代码空间配置是一种邀请新人轻松开始贡献的好方法。

A new open-source contributor or new hire at your organization can quickly fire up a codespace and get hacking on a good first issue with no local environment set up or installations necessary!

您组织中的新开放源代码贡献者或新员工可以快速启动代码空间,并在无需设置或安装本地环境的情况下就如何good first issue准备!

Starting a new codespace

We’ve added codespace configuration settings over at the OWASP Web Security Testing Guide (WSTG). Want to take it for a spin? See our open issues.

我们在OWASP Web安全测试指南(WSTG)上添加了代码空间配置设置。 想要试一试吗? 请参阅我们的未解决问题

配置代码空间 (Configuring Codespaces)

You can use Visual Studio Code’s .devcontainer folder to configure a development container for your repository as well.

您也可以使用Visual Studio Code的.devcontainer文件夹为存储库配置开发容器。

Many pre-built containers are available. Just copy the .devcontainer you need to your repository root. If your repository doesn’t have one, a default base Linux image will be used.

有许多预制的容器可用 。 只需将所需的.devcontainer复制到存储库根目录。 如果您的存储库中没有,则将使用默认的基本Linux映像

Here’s a reason to remove .vscode from your .gitignore file: Any new codespaces created in your repository will now respect settings found at .vscode/settings.json. This means that your online IDE can have the same workspace configuration as you have on your local machine. Isn’t that useful?

这是从.gitignore文件中删除.vscode的原因:现在,在存储库中创建的任何新代码空间都将遵循.vscode/settings.json 。 这意味着您的在线IDE可以具有与本地计算机上相同的工作区配置。 那有用吗?

使代码空间个性化 (Making Codespaces Personal)

For next-level dotfiles personalization, consider committing relevant files from your local dotfiles folder as a public GitHub repository at yourusername/dotfiles.

对于下级dotfiles个性化 ,请考虑将本地dotfiles文件夹中的相关文件作为公共GitHub存储库提交到yourusername/dotfiles

When you create a new codespace, this brings in your configurations — such as shell aliases and preferences — by creating symlinks to dotfiles in your codespace $HOME. This personalizes all the codespaces you create in your account.

创建新的代码空间时,这将通过在代码空间$HOME创建指向点文件的符号链接来引入配置(如外壳别名和首选项)。 这样可以个性化您在帐户中创建的所有代码空间。

Need some inspiration? Browse my dotfiles repository on GitHub.

需要灵感吗? 浏览我在GitHub上的dotfiles存储库

在代码空间中开发 (Developing in Codespaces)

Developing in a codespace is a familiar experience for Visual Studio Code users, right down to running an application locally.

对于Visual Studio Code用户而言,在代码空间中进行开发是一种熟悉的体验,甚至可以在本地运行应用程序。

Thanks to port forwarding, when I run an application in a codespace terminal, clicking on the resulting localhost URL takes me to the appropriate port as output from my codespace.

感谢端口转发 ,当我在代码空间终端中运行应用程序时,单击生成的localhost URL会将我带到适当的端口,作为代码空间的输出。

When I’m working on my blog in my codespace, for example, I run hugo serve, then click the provided localhost:1313 link to see a preview of my changes in another browser tab.

例如,当我在代码空间中处理博客时,我运行hugo serve ,然后单击提供的localhost:1313链接以在另一个浏览器选项卡中查看所做更改的预览。

Want to stay in sync between devices? There’s an extension for that. You can connect to your codespace from Visual Studio Code on your local machine so you can always pick up right where you left off.

想要在设备之间保持同步吗? 有一个扩展。 您可以本地计算机上的Visual Studio Code连接到代码空间,以便始终从上次中断的地方开始接听代码

随处发展 (Develop Anywhere)

Codespaces are a super-exciting addition to my GitHub workflow. They allow me to access my full development process pretty much anywhere, using devices like my iPad.

代码空间是我GitHub工作流程中非常令人兴奋的一个补充。 它们使我可以使用iPad等设备在几乎任何地方访问我的完整开发过程。

They’ll also make it easier for new open-source contributors or new hires at your organization to hit the ground running with a set-up IDE. If you have access to the limited beta, I invite you to spin up a codespace and try contributing to the WSTG or to an issue on one of my open-source projects.

它们还将使组织中的新开放源代码贡献者或新员工更容易通过设置IDE踏上第一步。 如果您可以使用有限的Beta版,请邀请您启动一个代码空间,并尝试为WSTG我的一个开源项目中的问题 做出贡献

I’m looking forward to general availability and seeing what the open-source community will dream up for GitHub Codespaces next!

我期待着通用的可用性,并期待开源社区接下来对GitHub Codespaces的梦想!

And yes, codespaces support your favorite Visual Studio Code theme:

是的, 代码空间支持您喜欢的Visual Studio Code主题

Image for post
Kabukichō theme for Visual Studio Code. Kabukichō主题的代码空间的屏幕快照。

翻译自: https://medium.com/better-programming/how-github-codespaces-increase-productivity-and-lower-barriers-ef39d82b086a

github代码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值