Skip to content

Commit 6a97016

Browse files
author
winjo
committed
fix(cli): 修复扩展安装 mode 写入问题
1 parent 15b1fe6 commit 6a97016

3 files changed

Lines changed: 14 additions & 18 deletions

File tree

packages/alex/README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
# alex
22

3-
> 框架集成,并分发不同的形式
3+
> 基于 kaitian 的纯前端版本 IDE 框架
44
5-
#### integration
6-
根据不同形式集成版本,提供各版本自定义的功能及模块,可按需定制,最总都会通过 webpack 打包为一个文件,初步分类
7-
- startup 本地测试用
8-
- editor 纯编辑版本
9-
- panel 带 panel 版本,可定制左右视图
10-
- app 完整版本
5+
## 核心功能
6+
* 开箱即用,通过 react 组件方式只需几行代码即可运行一个无容器版本的 IDE
7+
* 内置 BrowserFS,根据业务形式定制 filesystem,实现文件读写
8+
* 通过 worker 扩展丰富 IDE 功能,支持扩展的自主安装
119

12-
#### distribution
13-
不同形式分发,实际 export 的代码,根据不同版本使用对应 bundler,同时包含本地和远程(iframe)两种形式,初步分类
14-
- editor 本地纯编辑版本
15-
- editor-webview 远程纯编辑版本
16-
- panel 本地 panel 版本
17-
- panel-webview 远程 panel 版本
18-
- app 本地完整版本
19-
- app-webview 远程完整版本
10+
## 开发文档
11+
* alex 集成: [https://yuque.antfin-inc.com/cloud-ide/alex](https://yuque.antfin-inc.com/cloud-ide/alex)
12+
* kaitian: [https://yuque.antfin-inc.com/ide-framework](https://yuque.antfin-inc.com/ide-framework)

packages/cli/src/commander.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ install kaitian extensions, you should config in package.json firstly, example:
2020
version can be ignored, then will use latest version under current kaitian framework version
2121
`
2222
)
23-
.action((cmd, ...args) => {
24-
if (args.length) {
23+
.action((__, command) => {
24+
if (command.args.length) {
2525
log.warn(
2626
'You provided more than one argument. if you want to install extensions, you should use install command'
2727
);

packages/cli/src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ export const install = async (
7171
)
7272
.subscribe(
7373
(ext) => {
74-
installedExtensions.push(ext);
74+
if (options?.mode === 'public') {
75+
ext.mode = 'public';
76+
}
77+
installedExtensions.push({ ...ext });
7578
log.info(`${formatExtension(ext)} 安装完成`);
7679
},
7780
(err) => {

0 commit comments

Comments
 (0)