Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8ecebfb7
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8ecebfb7
编写于
10月 04, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
var -> let
上级
38886a08
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
23 deletion
+23
-23
build/lib/bundle.ts
build/lib/bundle.ts
+6
-6
build/lib/i18n.ts
build/lib/i18n.ts
+7
-7
build/lib/nls.ts
build/lib/nls.ts
+5
-5
build/lib/standalone.ts
build/lib/standalone.ts
+1
-1
build/lib/util.ts
build/lib/util.ts
+4
-4
未找到文件。
build/lib/bundle.ts
浏览文件 @
8ecebfb7
...
...
@@ -115,12 +115,12 @@ export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callba
});
var
code
=
require
(
'
fs
'
).
readFileSync
(
path
.
join
(
__dirname
,
'
../../src/vs/loader.js
'
));
var
r
:
Function
=
<
any
>
vm
.
runInThisContext
(
'
(function(require, module, exports) {
'
+
code
+
'
\n
});
'
);
var
loaderModule
=
{
exports
:
{}
};
const
code
=
require
(
'
fs
'
).
readFileSync
(
path
.
join
(
__dirname
,
'
../../src/vs/loader.js
'
));
const
r
:
Function
=
<
any
>
vm
.
runInThisContext
(
'
(function(require, module, exports) {
'
+
code
+
'
\n
});
'
);
const
loaderModule
=
{
exports
:
{}
};
r
.
call
({},
require
,
loaderModule
,
loaderModule
.
exports
);
var
loader
:
any
=
loaderModule
.
exports
;
const
loader
:
any
=
loaderModule
.
exports
;
config
.
isBuild
=
true
;
config
.
paths
=
config
.
paths
||
{};
config
.
paths
[
'
vs/nls
'
]
=
'
out-build/vs/nls.build
'
;
...
...
@@ -483,8 +483,8 @@ function emitEntryPoint(
}
function
readFileAndRemoveBOM
(
path
:
string
):
string
{
var
BOM_CHAR_CODE
=
65279
;
var
contents
=
fs
.
readFileSync
(
path
,
'
utf8
'
);
const
BOM_CHAR_CODE
=
65279
;
let
contents
=
fs
.
readFileSync
(
path
,
'
utf8
'
);
// Remove BOM
if
(
contents
.
charCodeAt
(
0
)
===
BOM_CHAR_CODE
)
{
contents
=
contents
.
substring
(
1
);
...
...
build/lib/i18n.ts
浏览文件 @
8ecebfb7
...
...
@@ -398,7 +398,7 @@ function stripComments(content: string): string {
* Third matches block comments
* Fourth matches line comments
*/
var
regexp
:
RegE
xp
=
/
(
"
(?:[^\\\"]
*
(?:\\
.
)?)
*"
)
|
(
'
(?:[^\\\']
*
(?:\\
.
)?)
*'
)
|
(\/\*(?:\r?\n
|.
)
*
?\*\/)
|
(\/{2,}
.*
?(?:(?:\r?\n)
|$
))
/g
;
const
rege
xp
=
/
(
"
(?:[^\\\"]
*
(?:\\
.
)?)
*"
)
|
(
'
(?:[^\\\']
*
(?:\\
.
)?)
*'
)
|
(\/\*(?:\r?\n
|.
)
*
?\*\/)
|
(\/{2,}
.*
?(?:(?:\r?\n)
|$
))
/g
;
let
result
=
content
.
replace
(
regexp
,
(
match
,
_m1
,
_m2
,
m3
,
m4
)
=>
{
// Only one of m1, m2, m3, m4 matches
if
(
m3
)
{
...
...
@@ -421,9 +421,9 @@ function stripComments(content: string): string {
}
function
escapeCharacters
(
value
:
string
):
string
{
var
result
:
string
[]
=
[];
for
(
var
i
=
0
;
i
<
value
.
length
;
i
++
)
{
var
ch
=
value
.
charAt
(
i
);
const
result
:
string
[]
=
[];
for
(
let
i
=
0
;
i
<
value
.
length
;
i
++
)
{
const
ch
=
value
.
charAt
(
i
);
switch
(
ch
)
{
case
'
\'
'
:
result
.
push
(
'
\\\'
'
);
...
...
@@ -1312,9 +1312,9 @@ function createIslFile(originalFilePath: string, messages: Map<string>, language
}
function
encodeEntities
(
value
:
string
):
string
{
var
result
:
string
[]
=
[];
for
(
var
i
=
0
;
i
<
value
.
length
;
i
++
)
{
var
ch
=
value
[
i
];
let
result
:
string
[]
=
[];
for
(
let
i
=
0
;
i
<
value
.
length
;
i
++
)
{
let
ch
=
value
[
i
];
switch
(
ch
)
{
case
'
<
'
:
result
.
push
(
'
<
'
);
...
...
build/lib/nls.ts
浏览文件 @
8ecebfb7
...
...
@@ -26,7 +26,7 @@ function collect(node: ts.Node, fn: (node: ts.Node) => CollectStepResult): ts.No
const
result
:
ts
.
Node
[]
=
[];
function
loop
(
node
:
ts
.
Node
)
{
var
stepResult
=
fn
(
node
);
let
stepResult
=
fn
(
node
);
if
(
stepResult
===
CollectStepResult
.
Yes
||
stepResult
===
CollectStepResult
.
YesAndRecurse
)
{
result
.
push
(
node
);
...
...
@@ -42,8 +42,8 @@ function collect(node: ts.Node, fn: (node: ts.Node) => CollectStepResult): ts.No
}
function
clone
<
T
>
(
object
:
T
):
T
{
var
result
=
<
T
>
{};
for
(
var
id
in
object
)
{
const
result
=
<
T
>
{};
for
(
let
id
in
object
)
{
result
[
id
]
=
object
[
id
];
}
return
result
;
...
...
@@ -67,8 +67,8 @@ define([], [${ wrap + lines.map(l => indent + l).join(',\n') + wrap}]);`;
* Returns a stream containing the patched JavaScript and source maps.
*/
function
nls
():
NodeJS
.
ReadWriteStream
{
var
input
=
through
();
var
output
=
input
.
pipe
(
through
(
function
(
f
:
FileSourceMap
)
{
const
input
=
through
();
const
output
=
input
.
pipe
(
through
(
function
(
f
:
FileSourceMap
)
{
if
(
!
f
.
sourceMap
)
{
return
this
.
emit
(
'
error
'
,
new
Error
(
`File
${
f
.
relative
}
does not have sourcemaps.`
));
}
...
...
build/lib/standalone.ts
浏览文件 @
8ecebfb7
...
...
@@ -321,7 +321,7 @@ function transportCSS(module: string, enqueue: (module: string) => void, write:
function
_replaceURL
(
contents
:
string
,
replacer
:
(
url
:
string
)
=>
string
):
string
{
// Use ")" as the terminator as quotes are oftentimes not used at all
return
contents
.
replace
(
/url
\(\s
*
([^\)]
+
)\s
*
\)?
/g
,
(
_
:
string
,
...
matches
:
string
[])
=>
{
var
url
=
matches
[
0
];
let
url
=
matches
[
0
];
// Eliminate starting quotes (the initial whitespace is not captured)
if
(
url
.
charAt
(
0
)
===
'
"
'
||
url
.
charAt
(
0
)
===
'
\'
'
)
{
url
=
url
.
substring
(
1
);
...
...
build/lib/util.ts
浏览文件 @
8ecebfb7
...
...
@@ -92,7 +92,7 @@ export function fixWin32DirectoryPermissions(): NodeJS.ReadWriteStream {
}
export
function
setExecutableBit
(
pattern
:
string
|
string
[]):
NodeJS
.
ReadWriteStream
{
var
setBit
=
es
.
mapSync
<
VinylFile
,
VinylFile
>
(
f
=>
{
const
setBit
=
es
.
mapSync
<
VinylFile
,
VinylFile
>
(
f
=>
{
f
.
stat
.
mode
=
/* 100755 */
33261
;
return
f
;
});
...
...
@@ -101,9 +101,9 @@ export function setExecutableBit(pattern: string | string[]): NodeJS.ReadWriteSt
return
setBit
;
}
var
input
=
es
.
through
();
var
filter
=
_filter
(
pattern
,
{
restore
:
true
});
var
output
=
input
const
input
=
es
.
through
();
const
filter
=
_filter
(
pattern
,
{
restore
:
true
});
const
output
=
input
.
pipe
(
filter
)
.
pipe
(
setBit
)
.
pipe
(
filter
.
restore
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录