Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
072eef20
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,发现更多精彩内容 >>
提交
072eef20
编写于
10月 24, 2018
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show monaco.d.ts output only when something has changed
上级
9deb8d4a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
0 addition
and
17 deletion
+0
-17
build/lib/compilation.js
build/lib/compilation.js
+0
-2
build/lib/compilation.ts
build/lib/compilation.ts
+0
-2
build/monaco/api.js
build/monaco/api.js
+0
-5
build/monaco/api.ts
build/monaco/api.ts
+0
-8
未找到文件。
build/lib/compilation.js
浏览文件 @
072eef20
...
...
@@ -172,11 +172,9 @@ class MonacoGenerator {
const
result
=
this
.
_run
();
if
(
!
result
)
{
// nothing really changed
this
.
_log
(
`monaco.d.ts is unchanged - total time took
${
Date
.
now
()
-
startTime
}
ms`
);
return
;
}
if
(
result
.
isTheSame
)
{
this
.
_log
(
`monaco.d.ts is unchanged - total time took
${
Date
.
now
()
-
startTime
}
ms`
);
return
;
}
fs
.
writeFileSync
(
result
.
filePath
,
result
.
content
);
...
...
build/lib/compilation.ts
浏览文件 @
072eef20
...
...
@@ -212,11 +212,9 @@ class MonacoGenerator {
const
result
=
this
.
_run
();
if
(
!
result
)
{
// nothing really changed
this
.
_log
(
`monaco.d.ts is unchanged - total time took
${
Date
.
now
()
-
startTime
}
ms`
);
return
;
}
if
(
result
.
isTheSame
)
{
this
.
_log
(
`monaco.d.ts is unchanged - total time took
${
Date
.
now
()
-
startTime
}
ms`
);
return
;
}
...
...
build/monaco/api.js
浏览文件 @
072eef20
...
...
@@ -10,9 +10,6 @@ const path = require("path");
const
util
=
require
(
"
gulp-util
"
);
const
dtsv
=
'
2
'
;
const
tsfmt
=
require
(
'
../../tsfmt.json
'
);
function
log
(
message
,
...
rest
)
{
util
.
log
(
util
.
colors
.
cyan
(
'
[monaco.d.ts]
'
),
message
,
...
rest
);
}
const
SRC
=
path
.
join
(
__dirname
,
'
../../src
'
);
exports
.
RECIPE_PATH
=
path
.
join
(
__dirname
,
'
./monaco.d.ts.recipe
'
);
const
DECLARATION_PATH
=
path
.
join
(
__dirname
,
'
../../src/vs/monaco.d.ts
'
);
...
...
@@ -432,7 +429,6 @@ function generateDeclarationFile(recipe, sourceFileGetter) {
};
}
function
_run
(
sourceFileGetter
)
{
log
(
'
Starting monaco.d.ts generation
'
);
const
recipe
=
fs
.
readFileSync
(
exports
.
RECIPE_PATH
).
toString
();
const
t
=
generateDeclarationFile
(
recipe
,
sourceFileGetter
);
if
(
!
t
)
{
...
...
@@ -445,7 +441,6 @@ function _run(sourceFileGetter) {
const
one
=
currentContent
.
replace
(
/
\r\n
/gm
,
'
\n
'
);
const
other
=
result
.
replace
(
/
\r\n
/gm
,
'
\n
'
);
const
isTheSame
=
(
one
===
other
);
log
(
'
Finished monaco.d.ts generation
'
);
return
{
content
:
result
,
usageContent
:
usageContent
,
...
...
build/monaco/api.ts
浏览文件 @
072eef20
...
...
@@ -12,10 +12,6 @@ const dtsv = '2';
const
tsfmt
=
require
(
'
../../tsfmt.json
'
);
function
log
(
message
:
any
,
...
rest
:
any
[]):
void
{
util
.
log
(
util
.
colors
.
cyan
(
'
[monaco.d.ts]
'
),
message
,
...
rest
);
}
const
SRC
=
path
.
join
(
__dirname
,
'
../../src
'
);
export
const
RECIPE_PATH
=
path
.
join
(
__dirname
,
'
./monaco.d.ts.recipe
'
);
const
DECLARATION_PATH
=
path
.
join
(
__dirname
,
'
../../src/vs/monaco.d.ts
'
);
...
...
@@ -520,8 +516,6 @@ export interface IMonacoDeclarationResult {
}
function
_run
(
sourceFileGetter
:
SourceFileGetter
):
IMonacoDeclarationResult
|
null
{
log
(
'
Starting monaco.d.ts generation
'
);
const
recipe
=
fs
.
readFileSync
(
RECIPE_PATH
).
toString
();
const
t
=
generateDeclarationFile
(
recipe
,
sourceFileGetter
);
if
(
!
t
)
{
...
...
@@ -537,8 +531,6 @@ function _run(sourceFileGetter: SourceFileGetter): IMonacoDeclarationResult | nu
const
other
=
result
.
replace
(
/
\r\n
/gm
,
'
\n
'
);
const
isTheSame
=
(
one
===
other
);
log
(
'
Finished monaco.d.ts generation
'
);
return
{
content
:
result
,
usageContent
:
usageContent
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录