Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
350dd1ed
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
350dd1ed
编写于
6月 09, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bundle editorWorkerServer into workerServer and editorSimpleWorker into simpleWorker
上级
13cb5df0
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
34 addition
and
14 deletion
+34
-14
build/lib/bundle.js
build/lib/bundle.js
+11
-1
build/lib/bundle.ts
build/lib/bundle.ts
+12
-1
src/vs/base/buildfile.js
src/vs/base/buildfile.js
+2
-0
src/vs/base/common/worker/simpleWorker.ts
src/vs/base/common/worker/simpleWorker.ts
+2
-1
src/vs/base/common/worker/workerServer.ts
src/vs/base/common/worker/workerServer.ts
+2
-1
src/vs/editor/buildfile.js
src/vs/editor/buildfile.js
+1
-8
src/vs/editor/common/modes/abstractMode.ts
src/vs/editor/common/modes/abstractMode.ts
+2
-1
src/vs/editor/common/services/editorSimpleWorker.ts
src/vs/editor/common/services/editorSimpleWorker.ts
+2
-1
未找到文件。
build/lib/bundle.js
浏览文件 @
350dd1ed
...
...
@@ -14,6 +14,16 @@ function bundle(entryPoints, config, callback) {
entryPoints
.
forEach
(
function
(
module
)
{
entryPointsMap
[
module
.
name
]
=
module
;
});
var
allMentionedModulesMap
=
{};
entryPoints
.
forEach
(
function
(
module
)
{
allMentionedModulesMap
[
module
.
name
]
=
true
;
(
module
.
include
||
[]).
forEach
(
function
(
includedModule
)
{
allMentionedModulesMap
[
includedModule
]
=
true
;
});
(
module
.
exclude
||
[]).
forEach
(
function
(
excludedModule
)
{
allMentionedModulesMap
[
excludedModule
]
=
true
;
});
});
var
code
=
require
(
'
fs
'
).
readFileSync
(
path
.
join
(
__dirname
,
'
../../src/vs/loader.js
'
));
var
r
=
vm
.
runInThisContext
(
'
(function(require, module, exports) {
'
+
code
+
'
\n
});
'
);
var
loaderModule
=
{
exports
:
{}
};
...
...
@@ -21,7 +31,7 @@ function bundle(entryPoints, config, callback) {
var
loader
=
loaderModule
.
exports
;
config
.
isBuild
=
true
;
loader
.
config
(
config
);
loader
(
Object
.
keys
(
entryPoint
sMap
),
function
()
{
loader
(
Object
.
keys
(
allMentionedModule
sMap
),
function
()
{
var
modules
=
loader
.
getBuildInfo
();
var
partialResult
=
emitEntryPoints
(
modules
,
entryPointsMap
);
var
cssInlinedResources
=
loader
(
'
vs/css
'
).
getInlinedResources
();
...
...
build/lib/bundle.ts
浏览文件 @
350dd1ed
...
...
@@ -99,6 +99,17 @@ export function bundle(entryPoints:IEntryPoint[], config:ILoaderConfig, callback
entryPointsMap
[
module
.
name
]
=
module
;
});
let
allMentionedModulesMap
:
{[
modules
:
string
]:
boolean
;}
=
{};
entryPoints
.
forEach
((
module
:
IEntryPoint
)
=>
{
allMentionedModulesMap
[
module
.
name
]
=
true
;
(
module
.
include
||
[]).
forEach
(
function
(
includedModule
)
{
allMentionedModulesMap
[
includedModule
]
=
true
;
});
(
module
.
exclude
||
[]).
forEach
(
function
(
excludedModule
)
{
allMentionedModulesMap
[
excludedModule
]
=
true
;
});
});
var
code
=
require
(
'
fs
'
).
readFileSync
(
path
.
join
(
__dirname
,
'
../../src/vs/loader.js
'
));
var
r
:
Function
=
<
any
>
vm
.
runInThisContext
(
'
(function(require, module, exports) {
'
+
code
+
'
\n
});
'
);
...
...
@@ -109,7 +120,7 @@ export function bundle(entryPoints:IEntryPoint[], config:ILoaderConfig, callback
config
.
isBuild
=
true
;
loader
.
config
(
config
);
loader
(
Object
.
keys
(
entryPoint
sMap
),
()
=>
{
loader
(
Object
.
keys
(
allMentionedModule
sMap
),
()
=>
{
let
modules
=
<
IBuildModuleInfo
[]
>
loader
.
getBuildInfo
();
let
partialResult
=
emitEntryPoints
(
modules
,
entryPointsMap
);
let
cssInlinedResources
=
loader
(
'
vs/css
'
).
getInlinedResources
();
...
...
src/vs/base/buildfile.js
浏览文件 @
350dd1ed
...
...
@@ -8,9 +8,11 @@
exports
.
collectModules
=
function
()
{
return
[{
name
:
'
vs/base/common/worker/workerServer
'
,
include
:
[
'
vs/editor/common/worker/editorWorkerServer
'
],
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
]
},
{
name
:
'
vs/base/common/worker/simpleWorker
'
,
include
:
[
'
vs/editor/common/services/editorSimpleWorker
'
],
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
]
}];
};
src/vs/base/common/worker/simpleWorker.ts
浏览文件 @
350dd1ed
...
...
@@ -328,7 +328,8 @@ export class SimpleWorkerServer {
ee
=
e
;
});
require
([
moduleId
],
(...
result
:
any
[])
=>
{
// Use the global require to be sure to get the global config
(
<
any
>
self
).
require
([
moduleId
],
(...
result
:
any
[])
=>
{
let
handlerModule
=
result
[
0
];
this
.
_requestHandler
=
handlerModule
.
create
();
...
...
src/vs/base/common/worker/workerServer.ts
浏览文件 @
350dd1ed
...
...
@@ -114,7 +114,8 @@ export class WorkerServer {
}
public
loadModule
(
moduleId
:
string
,
callback
:
Function
,
errorback
:(
err
:
any
)
=>
void
):
void
{
require
([
moduleId
],
(...
result
:
any
[])
=>
{
// Use the global require to be sure to get the global config
(
<
any
>
self
).
require
([
moduleId
],
(...
result
:
any
[])
=>
{
callback
(
result
[
0
]);
},
errorback
);
}
...
...
src/vs/editor/buildfile.js
浏览文件 @
350dd1ed
...
...
@@ -6,12 +6,5 @@
'
use strict
'
;
exports
.
collectModules
=
function
()
{
return
[{
name
:
'
vs/editor/common/worker/editorWorkerServer
'
,
include
:
[
'
vs/base/common/severity
'
],
exclude
:
[
'
vs/base/common/worker/workerServer
'
,
'
vs/css
'
,
'
vs/nls
'
]
},
{
name
:
'
vs/editor/common/services/editorSimpleWorker
'
,
exclude
:
[
'
vs/base/common/worker/simpleWorker
'
,
'
vs/css
'
,
'
vs/nls
'
]
}];
return
[];
};
src/vs/editor/common/modes/abstractMode.ts
浏览文件 @
350dd1ed
...
...
@@ -68,7 +68,8 @@ export class ModeWorkerManager<W> {
private
static
_loadModule
(
moduleName
:
string
):
TPromise
<
any
>
{
return
new
TPromise
((
c
,
e
,
p
)
=>
{
require
([
moduleName
],
c
,
e
);
// Use the global require to be sure to get the global config
(
<
any
>
self
).
require
([
moduleName
],
c
,
e
);
},
()
=>
{
// Cannot cancel loading code
});
...
...
src/vs/editor/common/services/editorSimpleWorker.ts
浏览文件 @
350dd1ed
...
...
@@ -290,7 +290,8 @@ export class EditorSimpleWorkerImpl implements IRequestHandler {
public
loadForeignModule
(
moduleId
:
string
):
TPromise
<
string
[]
>
{
return
new
TPromise
<
any
>
((
c
,
e
)
=>
{
require
([
moduleId
],
(
foreignModule
)
=>
{
// Use the global require to be sure to get the global config
(
<
any
>
self
).
require
([
moduleId
],
(
foreignModule
)
=>
{
this
.
_foreignModule
=
foreignModule
.
create
();
let
methods
:
string
[]
=
[];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录