From d06db43b41cccbb5b8f35e4594c823177ea33318 Mon Sep 17 00:00:00 2001 From: Sven Efftinge Date: Fri, 8 Feb 2019 03:01:01 +0100 Subject: [PATCH] Added Gitpod support (#14307) --- .gitpod.yml | 8 ++++++++ README.md | 6 ++++++ site/bisheng.config.js | 5 +++++ 3 files changed, 19 insertions(+) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000000..00e889fe0e --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,8 @@ +ports: +- port: 8001 + onOpen: open-preview +tasks: +- before: > + export DEV_HOST=$(gp url 8001) + init: npm install + command: npm start diff --git a/README.md b/README.md index 5e97a53468..66dcb70eb0 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,12 @@ See [i18n](http://ant.design/docs/react/i18n). ## ⌨️ Development +Use Gitpod, a free online dev environment for GitHub. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ant-design/ant-design) + +Or clone locally: + ```bash $ git clone git@github.com:ant-design/ant-design.git $ cd ant-design diff --git a/site/bisheng.config.js b/site/bisheng.config.js index 17cf4b2106..28dd3550c4 100644 --- a/site/bisheng.config.js +++ b/site/bisheng.config.js @@ -123,6 +123,11 @@ module.exports = { return config; }, + devServerConfig: { + public: process.env.DEV_HOST || 'localhost', + disableHostCheck: !!process.env.DEV_HOST, + }, + htmlTemplateExtraData: { isDev, usePreact,