chore: add gitpod support (#2646)

* update gitpod support

* fix gitpod button

* change base image

* try update port

* fix build issue

* improve port

Co-authored-by: James Yeung <shunjiey@hotmail.com>
This commit is contained in:
Newbe36524 2022-08-31 14:01:54 +08:00 committed by GitHub
parent 538a479afc
commit c691eb9aa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 3 deletions

20
.gitpod.yml Normal file
View File

@ -0,0 +1,20 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.
image: gitpod/workspace-dotnet
tasks:
- init: |
npm install
command: |
dotnet build ./site/AntDesign.Docs.Build/AntDesign.Docs.Build.csproj
npm run start
ports:
- port: 5000
visibility: public
onOpen: open-browser
- port: 5001
visibility: public
onOpen: ignore
- port: 30000-60000
visibility: public
onOpen: ignore

View File

@ -154,7 +154,15 @@ WebAssembly 静态托管页面示例
<Button Type="primary">Hello World!</Button>
```
## ⌨️ 本地开发
## ⌨️ 开发
### Gitpod
点击下方按钮,免费创建一个新的工作区用于开发。
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ant-design-blazor/ant-design-blazor)
### 本地
- 先安装 [.NET Core SDK](https://dotnet.microsoft.com/download/dotnet/6.0?WT.mc_id=DT-MVP-5003987) 6.0.100 以上版本
- 安装 Node.js只用于样式文件和互操作所需 TS 文件的构建)

View File

@ -159,7 +159,15 @@ Options for the template
<Button Type="@ButtonType.Primary">Hello World!</Button>
```
## ⌨️ Local Development
## ⌨️ Development
### Gitpod
Click the button below to start a new workspace for development for free.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ant-design-blazor/ant-design-blazor)
### Local
- Install [.NET Core SDK](https://dotnet.microsoft.com/download/dotnet/6.0?WT.mc_id=DT-MVP-5003987) 6.0.100 or later.
- Install Node.js (only for building style files and interoperable TypeScript files)

View File

@ -29,7 +29,8 @@ if (!app.Environment.IsDevelopment())
app.UseHsts();
}
app.UseHttpsRedirection();
// disable UseHttpsRedirection to support open site in gitpod workspace, since there is a problem about https endpoint in Gitpod
// app.UseHttpsRedirection();
#if NET5_0_OR_GREATER
app.UseBlazorPolyfill();
#endif

View File

@ -6,5 +6,15 @@
"System": "Information",
"Microsoft": "Information"
}
},
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:5000"
},
"Https": {
"Url": "https://+:5001"
}
}
}
}