-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
113 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<h1 align="center">OpenSumi Web Sample</h1> | ||
<div align="center"> | ||
|
||
[![License][license-image]][license-url] | ||
[![Docker Image CI][docker-image]][docker-uri] | ||
[![CLA assistant][cla-image]][cla-url] | ||
|
||
|
||
[docker-uri]: https://github.com/opensumi/ide-startup/actions/workflows/docker-image.yml | ||
[docker-image]: https://github.com/opensumi/ide-startup/actions/workflows/docker-image.yml/badge.svg | ||
[license-url]: https://github.com/opensumi/ide-startup/blob/master/LICENSE | ||
[license-image]: https://img.shields.io/npm/l/@opensumi/ide-core-common.svg | ||
[cla-image]: https://cla-assistant.io/readme/badge/opensumi/core | ||
[cla-url]: https://cla-assistant.io/opensumi/core | ||
|
||
</div> | ||
|
||
本项目用于展示如何在 Web 下运行 OpenSumi。 | ||
|
||
![perview](https://img.alicdn.com/imgextra/i2/O1CN01SYtcfI25R80gBjBTI_!!6000000007522-2-tps-1337-918.png) | ||
|
||
[English](./README.md) | 简体中文 | ||
|
||
### Quick Start | ||
|
||
```bash | ||
$ git clone [email protected]:opensumi/ide-startup.git | ||
$ cd ide-startup | ||
$ yarn | ||
$ yarn start | ||
``` | ||
|
||
浏览器打开 [http://127.0.0.1:8080](http://127.0.0.1:8080)。 | ||
|
||
你可以通过添加 `workspaceDir` 参数至 URI 来实现对指定目录文件的方案,例如:`http://0.0.0.0:8080?workspaceDir=/path/to/dir`. | ||
|
||
### 目录结构 | ||
|
||
```bash | ||
. | ||
├── extensions # 内置插件安装位置 | ||
├── configs # 构建配置 | ||
├── src | ||
│ ├── browser | ||
│ └── node | ||
├── tsconfig.json | ||
├── package.json | ||
└── README.md | ||
``` | ||
|
||
## 使用 Docker 镜像 | ||
|
||
```bash | ||
# Pull the image | ||
docker pull ghcr.io/opensumi/opensumi-web:latest | ||
|
||
# Run | ||
docker run --rm -d -p 8080:8000/tcp ghcr.io/opensumi/opensumi-web:latest | ||
``` | ||
|
||
浏览器打开 `http://0.0.0.0:8080` 访问。 | ||
|
||
## 协议 | ||
|
||
Copyright (c) 2019-present Alibaba Group Holding Limited, Ant Group Co. Ltd. | ||
|
||
本项目采用 [MIT](LICENSE) 协议。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,66 @@ | ||
## OpenSumi Web 集成示例 | ||
![Docker Image CI](https://github.com/opensumi/ide-startup/actions/workflows/docker-image.yml/badge.svg) | ||
<h1 align="center">OpenSumi Web Sample</h1> | ||
<div align="center"> | ||
|
||
本项目为基于 OpenSumi 框架的 Web 版 IDE 集成示例 | ||
[![License][license-image]][license-url] | ||
[![Docker Image CI][docker-image]][docker-uri] | ||
[![CLA assistant][cla-image]][cla-url] | ||
|
||
### 项目结构 | ||
|
||
```bash | ||
. | ||
├── workspace # 工作目录 | ||
├── extensions # 插件目录 | ||
├── configs # webpack 配置 | ||
├── src | ||
│ ├── browser | ||
│ └── node | ||
├── tsconfig.json | ||
├── package.json | ||
└── README.md | ||
``` | ||
[docker-uri]: https://github.com/opensumi/ide-startup/actions/workflows/docker-image.yml | ||
[docker-image]: https://github.com/opensumi/ide-startup/actions/workflows/docker-image.yml/badge.svg | ||
[license-url]: https://github.com/opensumi/ide-startup/blob/master/LICENSE | ||
[license-image]: https://img.shields.io/npm/l/@opensumi/ide-core-common.svg | ||
[cla-image]: https://cla-assistant.io/readme/badge/opensumi/core | ||
[cla-url]: https://cla-assistant.io/opensumi/core | ||
|
||
</div> | ||
This project is used to show how to run OpenSumi on Web. | ||
|
||
### 启动 | ||
![perview](https://img.alicdn.com/imgextra/i2/O1CN01SYtcfI25R80gBjBTI_!!6000000007522-2-tps-1337-918.png) | ||
|
||
English | [简体中文](./README-zh_CN.md) | ||
|
||
## Quick Start | ||
|
||
```bash | ||
$ git clone [email protected]:opensumi/ide-startup.git | ||
$ cd ide-startup | ||
$ yarn # 安装依赖后会自动执行 prepare,编译 Node.js 和 WebWorker 两个插件环境, 下载默认插件 | ||
$ mkdir workspace # 创建默认的 workspace 目录,启动后会默认打开该目录 | ||
$ yarn download:extensions # 安装默认内置插件 | ||
$ yarn start # 启动前端、后端服务器及 Webview Host | ||
$ yarn | ||
$ yarn start | ||
``` | ||
|
||
浏览器打开 [http://0.0.0.0:8080](http://0.0.0.0:8080) | ||
Open [http://127.0.0.1:8080](http://127.0.0.1:8080). | ||
|
||
URL 添加 query 参数 `workspaceDir` 即可打开指定目录,例如 `http://0.0.0.0:8080?workspaceDir=/path/to/dir` | ||
You can add `workspaceDir` to the URL to open the specified directory, for example `http://0.0.0.0:8080?workspaceDir=/path/to/dir`. | ||
|
||
![OpenSumi](./snapshots/sumi-startup.png) | ||
## Project Structure | ||
|
||
### 使用 Docker 镜像 | ||
```bash | ||
. | ||
├── extensions # The Buit-in extensions | ||
├── configs # Build configuration | ||
├── src | ||
│ ├── browser | ||
│ └── node | ||
├── tsconfig.json | ||
├── package.json | ||
└── README.md | ||
``` | ||
|
||
## Use Docker | ||
|
||
```bash | ||
# 拉取镜像 | ||
# Pull the image | ||
docker pull ghcr.io/opensumi/opensumi-web:latest | ||
|
||
# 运行 | ||
# Run | ||
docker run --rm -d -p 8080:8000/tcp ghcr.io/opensumi/opensumi-web:latest | ||
``` | ||
|
||
浏览器打开 `http://0.0.0.0:8080` | ||
Open `http://0.0.0.0:8080` | ||
|
||
## License | ||
|
||
Copyright (c) 2019-present Alibaba Group Holding Limited, Ant Group Co. Ltd. | ||
|
||
Licensed under the [MIT](LICENSE) license. |
Binary file not shown.