Skip to content

Commit 521123c

Browse files
committed
feat: atomgit 平台不加载 graph 插件
1 parent 9da5bdc commit 521123c

1 file changed

Lines changed: 34 additions & 28 deletions

File tree

packages/integrations/src/startup/index.tsx

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IAppInstance, AppRenderer, getDefaultLayoutConfig, SlotLocation } from
44
import * as Alex from '@alipay/alex';
55
import '@alipay/alex/languages';
66
import { CodeServiceModule } from '@alipay/alex-code-service';
7-
import { CodeAPIModule } from '@alipay/alex-code-api';
7+
import { CodeAPIModule, CodePlatform } from '@alipay/alex-code-api';
88
import { isFilesystemReady } from '@alipay/alex-core';
99
import { StartupModule } from './startup.module';
1010
import css from '@alipay/alex/extensions/alex-ext-public.css-language-features-worker';
@@ -87,6 +87,38 @@ if (pathParts[2]) {
8787
}
8888
config.refPath = pathParts.slice(3).join('/');
8989

90+
const extensionMetadata = [
91+
css,
92+
html,
93+
json,
94+
markdown,
95+
vditor,
96+
typescript,
97+
codeservice,
98+
gitlens,
99+
imagePreview,
100+
webSCM,
101+
referencesView,
102+
codeswing,
103+
emmet,
104+
anycodeCSharp,
105+
anycodeCpp,
106+
anycodeGo,
107+
anycodeJava,
108+
anycodePhp,
109+
anycodePython,
110+
anycodeRust,
111+
anycodeTypescript,
112+
anycode,
113+
codeRunner,
114+
mergeConflict,
115+
]
116+
117+
// atomgit 平台暂时不加载 graph 插件
118+
if (platform !== CodePlatform.atomgit) {
119+
extensionMetadata.push(graph);
120+
}
121+
90122
const App = () => (
91123
<AppRenderer
92124
onLoad={(app) => {
@@ -128,33 +160,7 @@ const App = () => (
128160
LocalExtensionModule,
129161
StartupModule,
130162
],
131-
extensionMetadata: [
132-
css,
133-
html,
134-
json,
135-
markdown,
136-
vditor,
137-
typescript,
138-
codeservice,
139-
gitlens,
140-
// graph,
141-
imagePreview,
142-
webSCM,
143-
referencesView,
144-
codeswing,
145-
emmet,
146-
anycodeCSharp,
147-
anycodeCpp,
148-
anycodeGo,
149-
anycodeJava,
150-
anycodePhp,
151-
anycodePython,
152-
anycodeRust,
153-
anycodeTypescript,
154-
anycode,
155-
codeRunner,
156-
mergeConflict,
157-
],
163+
extensionMetadata,
158164
workspaceDir: `${platform}/${config.owner}/${config.name}`,
159165
layoutConfig,
160166
defaultPreferences: {

0 commit comments

Comments
 (0)