Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
6e465986
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
6e465986
编写于
11月 12, 2018
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix editor publishing scripts (on Windows)
上级
746b5ea5
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
4682 deletion
+27
-4682
build/gulpfile.editor.js
build/gulpfile.editor.js
+13
-4
build/lib/standalone.js
build/lib/standalone.js
+5
-3
build/lib/standalone.ts
build/lib/standalone.ts
+5
-3
build/lib/treeshaking.js
build/lib/treeshaking.js
+2
-2
build/lib/treeshaking.ts
build/lib/treeshaking.ts
+2
-2
build/monaco/yarn.lock
build/monaco/yarn.lock
+0
-4668
未找到文件。
build/gulpfile.editor.js
浏览文件 @
6e465986
...
...
@@ -152,10 +152,19 @@ gulp.task('extract-editor-esm', ['clean-editor-esm', 'clean-editor-distro', 'ext
});
});
gulp
.
task
(
'
compile-editor-esm
'
,
[
'
extract-editor-esm
'
,
'
clean-editor-distro
'
],
function
()
{
const
result
=
cp
.
spawnSync
(
`node`
,
[
`../node_modules/.bin/tsc`
],
{
cwd
:
path
.
join
(
__dirname
,
'
../out-editor-esm
'
)
});
console
.
log
(
result
.
stdout
.
toString
());
if
(
process
.
platform
===
'
win32
'
)
{
const
result
=
cp
.
spawnSync
(
`..\\node_modules\\.bin\\tsc.cmd`
,
{
cwd
:
path
.
join
(
__dirname
,
'
../out-editor-esm
'
)
});
console
.
log
(
result
.
stdout
.
toString
());
console
.
log
(
result
.
stderr
.
toString
());
}
else
{
const
result
=
cp
.
spawnSync
(
`node`
,
[
`../node_modules/.bin/tsc`
],
{
cwd
:
path
.
join
(
__dirname
,
'
../out-editor-esm
'
)
});
console
.
log
(
result
.
stdout
.
toString
());
console
.
log
(
result
.
stderr
.
toString
());
}
});
function
toExternalDTS
(
contents
)
{
...
...
build/lib/standalone.js
浏览文件 @
6e465986
...
...
@@ -90,6 +90,7 @@ function extractEditor(options) {
}
}
}
delete
tsConfig
.
compilerOptions
.
moduleResolution
;
writeOutputFile
(
'
tsconfig.json
'
,
JSON
.
stringify
(
tsConfig
,
null
,
'
\t
'
));
[
'
vs/css.build.js
'
,
...
...
@@ -126,7 +127,7 @@ function createESMSourcesAndResources2(options) {
if
(
file
===
'
tsconfig.json
'
)
{
const
tsConfig
=
JSON
.
parse
(
fs
.
readFileSync
(
path
.
join
(
SRC_FOLDER
,
file
)).
toString
());
tsConfig
.
compilerOptions
.
module
=
'
es6
'
;
tsConfig
.
compilerOptions
.
outDir
=
path
.
join
(
path
.
relative
(
OUT_FOLDER
,
OUT_RESOURCES_FOLDER
),
'
vs
'
);
tsConfig
.
compilerOptions
.
outDir
=
path
.
join
(
path
.
relative
(
OUT_FOLDER
,
OUT_RESOURCES_FOLDER
),
'
vs
'
)
.
replace
(
/
\\
/g
,
'
/
'
)
;
write
(
getDestAbsoluteFilePath
(
file
),
JSON
.
stringify
(
tsConfig
,
null
,
'
\t
'
));
continue
;
}
...
...
@@ -154,15 +155,16 @@ function createESMSourcesAndResources2(options) {
importedFilepath
=
path
.
join
(
path
.
dirname
(
file
),
importedFilepath
);
}
let
relativePath
;
if
(
importedFilepath
===
path
.
dirname
(
file
))
{
if
(
importedFilepath
===
path
.
dirname
(
file
)
.
replace
(
/
\\
/g
,
'
/
'
)
)
{
relativePath
=
'
../
'
+
path
.
basename
(
path
.
dirname
(
file
));
}
else
if
(
importedFilepath
===
path
.
dirname
(
path
.
dirname
(
file
)))
{
else
if
(
importedFilepath
===
path
.
dirname
(
path
.
dirname
(
file
))
.
replace
(
/
\\
/g
,
'
/
'
)
)
{
relativePath
=
'
../../
'
+
path
.
basename
(
path
.
dirname
(
path
.
dirname
(
file
)));
}
else
{
relativePath
=
path
.
relative
(
path
.
dirname
(
file
),
importedFilepath
);
}
relativePath
=
relativePath
.
replace
(
/
\\
/g
,
'
/
'
);
if
(
!
/
(
^
\.\/)
|
(
^
\.\.\/)
/
.
test
(
relativePath
))
{
relativePath
=
'
./
'
+
relativePath
;
}
...
...
build/lib/standalone.ts
浏览文件 @
6e465986
...
...
@@ -99,6 +99,7 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
}
}
delete
tsConfig
.
compilerOptions
.
moduleResolution
;
writeOutputFile
(
'
tsconfig.json
'
,
JSON
.
stringify
(
tsConfig
,
null
,
'
\t
'
));
[
...
...
@@ -148,7 +149,7 @@ export function createESMSourcesAndResources2(options: IOptions2): void {
if
(
file
===
'
tsconfig.json
'
)
{
const
tsConfig
=
JSON
.
parse
(
fs
.
readFileSync
(
path
.
join
(
SRC_FOLDER
,
file
)).
toString
());
tsConfig
.
compilerOptions
.
module
=
'
es6
'
;
tsConfig
.
compilerOptions
.
outDir
=
path
.
join
(
path
.
relative
(
OUT_FOLDER
,
OUT_RESOURCES_FOLDER
),
'
vs
'
);
tsConfig
.
compilerOptions
.
outDir
=
path
.
join
(
path
.
relative
(
OUT_FOLDER
,
OUT_RESOURCES_FOLDER
),
'
vs
'
)
.
replace
(
/
\\
/g
,
'
/
'
)
;
write
(
getDestAbsoluteFilePath
(
file
),
JSON
.
stringify
(
tsConfig
,
null
,
'
\t
'
));
continue
;
}
...
...
@@ -181,13 +182,14 @@ export function createESMSourcesAndResources2(options: IOptions2): void {
}
let
relativePath
:
string
;
if
(
importedFilepath
===
path
.
dirname
(
file
))
{
if
(
importedFilepath
===
path
.
dirname
(
file
)
.
replace
(
/
\\
/g
,
'
/
'
)
)
{
relativePath
=
'
../
'
+
path
.
basename
(
path
.
dirname
(
file
));
}
else
if
(
importedFilepath
===
path
.
dirname
(
path
.
dirname
(
file
)))
{
}
else
if
(
importedFilepath
===
path
.
dirname
(
path
.
dirname
(
file
))
.
replace
(
/
\\
/g
,
'
/
'
)
)
{
relativePath
=
'
../../
'
+
path
.
basename
(
path
.
dirname
(
path
.
dirname
(
file
)));
}
else
{
relativePath
=
path
.
relative
(
path
.
dirname
(
file
),
importedFilepath
);
}
relativePath
=
relativePath
.
replace
(
/
\\
/g
,
'
/
'
);
if
(
!
/
(
^
\.\/)
|
(
^
\.\.\/)
/
.
test
(
relativePath
))
{
relativePath
=
'
./
'
+
relativePath
;
}
...
...
build/lib/treeshaking.js
浏览文件 @
6e465986
...
...
@@ -57,7 +57,7 @@ function createTypeScriptLanguageService(options) {
const
FILES
=
discoverAndReadFiles
(
options
);
// Add fake usage files
options
.
inlineEntryPoints
.
forEach
((
inlineEntryPoint
,
index
)
=>
{
FILES
[
`inlineEntryPoint
:
${
index
}
.ts`
]
=
inlineEntryPoint
;
FILES
[
`inlineEntryPoint
.
${
index
}
.ts`
]
=
inlineEntryPoint
;
});
// Add additional typings
options
.
typings
.
forEach
((
typing
)
=>
{
...
...
@@ -336,7 +336,7 @@ function markNodes(languageService, options) {
}
options
.
entryPoints
.
forEach
(
moduleId
=>
enqueueFile
(
moduleId
+
'
.ts
'
));
// Add fake usage files
options
.
inlineEntryPoints
.
forEach
((
_
,
index
)
=>
enqueueFile
(
`inlineEntryPoint
:
${
index
}
.ts`
));
options
.
inlineEntryPoints
.
forEach
((
_
,
index
)
=>
enqueueFile
(
`inlineEntryPoint
.
${
index
}
.ts`
));
let
step
=
0
;
const
checker
=
program
.
getTypeChecker
();
while
(
black_queue
.
length
>
0
||
gray_queue
.
length
>
0
)
{
...
...
build/lib/treeshaking.ts
浏览文件 @
6e465986
...
...
@@ -110,7 +110,7 @@ function createTypeScriptLanguageService(options: ITreeShakingOptions): ts.Langu
// Add fake usage files
options
.
inlineEntryPoints
.
forEach
((
inlineEntryPoint
,
index
)
=>
{
FILES
[
`inlineEntryPoint
:
${
index
}
.ts`
]
=
inlineEntryPoint
;
FILES
[
`inlineEntryPoint
.
${
index
}
.ts`
]
=
inlineEntryPoint
;
});
// Add additional typings
...
...
@@ -445,7 +445,7 @@ function markNodes(languageService: ts.LanguageService, options: ITreeShakingOpt
options
.
entryPoints
.
forEach
(
moduleId
=>
enqueueFile
(
moduleId
+
'
.ts
'
));
// Add fake usage files
options
.
inlineEntryPoints
.
forEach
((
_
,
index
)
=>
enqueueFile
(
`inlineEntryPoint
:
${
index
}
.ts`
));
options
.
inlineEntryPoints
.
forEach
((
_
,
index
)
=>
enqueueFile
(
`inlineEntryPoint
.
${
index
}
.ts`
));
let
step
=
0
;
...
...
build/monaco/yarn.lock
已删除
100644 → 0
浏览文件 @
746b5ea5
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录