feat: add codespace docs (#987)

* feat: add codespace docs

* fix: image & typo

* docs: update codespace directions

* fix: typos & omissions

* fix: 2 typos

* docs: move codespace directions after local

* fix: change npx command
This commit is contained in:
J. Degand
2024-06-17 03:19:03 -04:00
committed by GitHub
parent 59bad32487
commit e6fd5468e2
2 changed files with 22 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -5,6 +5,7 @@ contributors:
- tomalaforge - tomalaforge
- 1fbr - 1fbr
- ho-ssain - ho-ssain
- jdegand
sidebar: sidebar:
order: 1 order: 1
--- ---
@@ -18,7 +19,7 @@ If you wish to submit an answer, you will need to have your own GitHub account.
## Fork the GitHub project ## Fork the GitHub project
Navigate to the [Angular Challenges Repository](https://github.com/tomalaforge/angular-challenges) and click on the <span class="github-neutral-btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> Navigate to the [Angular Challenges Repository](https://github.com/tomalaforge/angular-challenges) and click on the <span class="github-neutral-btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2">
<path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork</span> button in the header. This will create a copy of this repository on your own GitHub page. <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork</span> button in the header. This will create a copy of this repository on your own GitHub profile.
## Clone the repository to your local machine ## Clone the repository to your local machine
@@ -59,3 +60,23 @@ Each challenge consists of:
- 🟢 easy - 🟢 easy
- 🟠 medium - 🟠 medium
- 🔴 difficult - 🔴 difficult
## (Alternately) Use GitHub Codespaces
From your <b>own instance</b> of the Angular Challenges repository, click the code button and navigate to the codespaces tab.
![Codespaces tab](../../../assets/codespaces.png)
Click the `Create codespace on main` button, and you will navigate to a GitHub codespace.
If you never used a GitHub codespace before, I would recommend you try this short interactive [GitHub Skills Tutorial](https://github.com/skills/code-with-codespaces).
When you navigate to the codespace, there will be a prompt to install the recommended `VS Code` plugins. If you plan on creating a challenge, you can use the `Nx plugin` to generate the starter code. Either way, the codespace will install the dependencies, and you can create a new branch, tackle any challenge, and create a pull request.
When you push to a branch, you do not have to provide a GitHub token.
Once you are finished, remember to pause or delete your codespace. If you don't, GitHub will automatically pause an idle codespace after 30 minutes. You do have a generous amount of free codespace time per month, but it is still important not to waste your allotment.
In the GitHub codespace, copy and paste will be blocked until you give permission.
The GitHub codespace uses port forwarding to serve the projects. Click the prompt after running `npx nx serve [project-name]` to navigate to `localhost:4200`.