Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e160332

Browse files
Codespaces wow quickstart (#19212)
* updating configuring doc * Adding some content changes * pre-built -> predefined to match vscode * reorganizing * moving guides around, rewriting about * adding reference folder * fixing brooken links * clarifying and simplifying about doc * removing limitations * 5 mins to wow initial draft * fixing broken tests * Add dotfiles * Apply suggestions from code review Co-authored-by: Amy Burns <[email protected]> * addressing comments * clarifying some text * Update dotfiles step Co-authored-by: amy <[email protected]>
1 parent 5f4e3c9 commit e160332

7 files changed

Lines changed: 87 additions & 0 deletions

File tree

8.86 KB
Loading
35.6 KB
Loading
4.89 KB
Loading
20.2 KB
Loading
7.53 KB
Loading
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
title: Codespaces quickstart
3+
intro: 'Try out {% data variables.product.prodname_codespaces %} in 5 minutes or less.'
4+
product: '{% data reusables.gated-features.codespaces %}'
5+
versions:
6+
free-pro-team: '*'
7+
type: quick_start
8+
topics:
9+
- Codespaces
10+
---
11+
12+
{% note %}
13+
14+
**Note:** {% data variables.product.prodname_codespaces %} is currently in limited public beta and subject to change. During the beta period, {% data variables.product.prodname_dotcom %} does not make any guarantees about the availability of {% data variables.product.prodname_codespaces %}.
15+
16+
{% endnote %}
17+
18+
### Introduction
19+
20+
In this guide, you'll create a codespace from the [sample repository](https://github.com/2percentsilk/haikus-for-codespaces) and explore some of the essential features available to you within the codespace.
21+
22+
The following example shows you how to create a codespace, connect to a forwarded port to view your running application, and personalize your setup with additional extensions and dotfiles.
23+
24+
### Creating your codespace
25+
26+
1. Navigate to the main page of the [sample repository](https://github.com/2percentsilk/haikus-for-codespaces).
27+
28+
2. Under the repository name, use the {% octicon "download" aria-label="The download icon" %} **Code** drop-down menu, and select **Open with Codespaces**.
29+
30+
![Open with Codespaces button](/assets/images/help/codespaces/open-with-codespaces-button.png)
31+
32+
3. To create a codespace, click {% octicon "plus" aria-label="The plus icon" %} **New codespace**.
33+
34+
![New codespace button](/assets/images/help/codespaces/new-codespace-button.png)
35+
36+
### Run the application
37+
38+
With your project open in a codespace, you can now run the application and launch it in a browser.
39+
40+
1. Start the application by entering `npm run dev` in the terminal. This command executes the `dev` script in the package.json file and starts up the web application defined in the sample repository.
41+
42+
![npm run dev in terminal](/assets/images/help/codespaces/codespaces-npm-run-dev.png)
43+
44+
2. When your project starts, you should see a toast in the bottom right corner with a prompt to connect to the port your project uses.
45+
46+
![Port forwarding toast](/assets/images/help/codespaces/quickstart-port-toast.png)
47+
48+
3. Click **Open in Browser** to view your running application in a new tab.
49+
50+
### Personalize with a theme extension
51+
52+
Within a codespace, you have access to the Visual Studio Code Marketplace. For this example, you'll install an extension that alters the theme but you can install any extension that is useful for your workflow.
53+
54+
1. In the left sidebar, click the Extensions icon.
55+
56+
2. In the search bar, enter `fairyfloss` and install the fairyfloss extension.
57+
58+
![Add an extension](/assets/images/help/codespaces/add-extension.png)
59+
60+
3. Select the `fairyfloss` theme by selecting it from the list.
61+
62+
![Select the fairyfloss theme](/assets/images/help/codespaces/fairyfloss.png)
63+
64+
4. Changes you make to your editor setup in the current codespace, such as theme and keyboard bindings, are synced automatically to other codespaces via [Settings Sync](https://code.visualstudio.com/docs/editor/settings-sync).
65+
66+
### Personalize with dotfiles
67+
68+
If your user account on GitHub owns a public repository named dotfiles, GitHub automatically uses this repository to personalize your codespace environment during codespace creation.
69+
70+
This example guides you through creating a dotfiles repository for your codespaces.
71+
72+
1. Navigate to the sample [dotfiles repository](https://github.com/aw-test-93/dotfiles/).
73+
74+
2. Fork the repository to your account and ensure it's public.
75+
76+
Verify the repository created under your account is named dotfiles, for example `yourname/dotfiles`. Any other name will cause {% data variables.product.prodname_codespaces %} to ignore the repository for personalization.
77+
78+
3. Create a new codespace from the [sample application repository](https://github.com/2percentsilk/haikus-for-codespaces) as dotfile updates are only applied at creation time. The sample dotfiles will change the command prompt to bold purple and blue text.
79+
80+
![Custom command prompt](/assets/images/help/codespaces/custom-prompt.png)
81+
82+
### Next Steps
83+
84+
You've successfully created, personalized, and run your first application within a codespace but there's so much more to explore! Here are some helpful resources for taking your next steps with {% data variables.product.prodname_codespaces %}.
85+
- "[Getting Started guides](/codespaces/getting-started-with-codespaces)" for using {% data variables.product.prodname_codespaces %} with specific languages
86+
- [Create a custom configuration](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project) to configure {% data variables.product.prodname_codespaces %} for your project.

content/codespaces/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ topics:
1717
### Table of Contents
1818

1919
{% link_in_list /about-codespaces %}
20+
{% link_in_list /codespaces-quickstart %}
2021
{% link_in_list /getting-started-with-codespaces %}
2122
{% link_in_list /setting-up-your-codespace %}
2223
{% link_in_list /developing-in-codespaces %}

0 commit comments

Comments
 (0)