Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
a3099a85
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,发现更多精彩内容 >>
未验证
提交
a3099a85
编写于
2月 07, 2019
作者:
A
Alexandru Dima
提交者:
GitHub
2月 07, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #67947 from Microsoft/alex/gulp4
Upgrade to gulp4
上级
021e796e
9dc75e92
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
1024 addition
and
1021 deletion
+1024
-1021
build/gulpfile.editor.js
build/gulpfile.editor.js
+2
-5
build/gulpfile.vscode.js
build/gulpfile.vscode.js
+2
-3
build/lib/optimize.js
build/lib/optimize.js
+2
-16
build/lib/optimize.ts
build/lib/optimize.ts
+1
-21
package.json
package.json
+16
-16
src/main.js
src/main.js
+1
-1
src/vs/workbench/parts/webview/electron-browser/webview-pre.js
...s/workbench/parts/webview/electron-browser/webview-pre.js
+1
-1
yarn.lock
yarn.lock
+999
-958
未找到文件。
build/gulpfile.editor.js
浏览文件 @
a3099a85
...
...
@@ -48,9 +48,6 @@ var editorResources = [
'
!**/test/**
'
];
var
editorOtherSources
=
[
];
var
BUNDLED_FILE_HEADER
=
[
'
/*!-----------------------------------------------------------
'
,
'
* Copyright (c) Microsoft Corporation. All rights reserved.
'
,
...
...
@@ -107,7 +104,6 @@ compileEditorAMDTask.displayName = 'compile-editor-amd';
const
optimizeEditorAMDTask
=
common
.
optimizeTask
({
src
:
'
out-editor-build
'
,
entryPoints
:
editorEntryPoints
,
otherSources
:
editorOtherSources
,
resources
:
editorResources
,
loaderConfig
:
{
paths
:
{
...
...
@@ -276,7 +272,7 @@ const finalEditorResourcesTask = function () {
var
strContents
=
data
.
contents
.
toString
();
var
newStr
=
'
//# sourceMappingURL=
'
+
relativePathToMap
.
replace
(
/
\\
/g
,
'
/
'
);
strContents
=
strContents
.
replace
(
/
\/\/
\
#
sourceMappingURL=
[^
]
+$/
,
newStr
);
strContents
=
strContents
.
replace
(
/
\/\/
# sourceMappingURL=
[^
]
+$/
,
newStr
);
data
.
contents
=
Buffer
.
from
(
strContents
);
this
.
emit
(
'
data
'
,
data
);
...
...
@@ -337,6 +333,7 @@ function createTscCompileTask(watch) {
let
errors
=
[];
let
reporter
=
createReporter
();
let
report
;
// eslint-disable-next-line no-control-regex
let
magic
=
/
[\u
001b
\u
009b
][
[()#;?
]
*
(?:[
0-9
]{1,4}(?:
;
[
0-9
]{0,4})
*
)?[
0-9A-ORZcf-nqry=><
]
/g
;
// https://stackoverflow.com/questions/25245716/remove-all-ansi-colors-styles-from-strings
child
.
stdout
.
on
(
'
data
'
,
data
=>
{
...
...
build/gulpfile.vscode.js
浏览文件 @
a3099a85
...
...
@@ -95,7 +95,6 @@ const optimizeVSCodeTask = util.task.series(
common
.
optimizeTask
({
src
:
'
out-build
'
,
entryPoints
:
vscodeEntryPoints
,
otherSources
:
[],
resources
:
vscodeResources
,
loaderConfig
:
common
.
loaderConfig
(
nodeModules
),
header
:
BUNDLED_FILE_HEADER
,
...
...
@@ -311,7 +310,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
const
productJsonStream
=
gulp
.
src
([
'
product.json
'
],
{
base
:
'
.
'
})
.
pipe
(
json
(
productJsonUpdate
));
const
license
=
gulp
.
src
([
'
LICENSES.chromium.html
'
,
'
LICENSE.txt
'
,
'
ThirdPartyNotices.txt
'
,
'
licenses/**
'
],
{
base
:
'
.
'
});
const
license
=
gulp
.
src
([
'
LICENSES.chromium.html
'
,
'
LICENSE.txt
'
,
'
ThirdPartyNotices.txt
'
,
'
licenses/**
'
],
{
base
:
'
.
'
,
allowEmpty
:
true
});
const
watermark
=
gulp
.
src
([
'
resources/letterpress.svg
'
,
'
resources/letterpress-dark.svg
'
,
'
resources/letterpress-hc.svg
'
],
{
base
:
'
.
'
});
...
...
@@ -404,7 +403,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
// result = es.merge(result, gulp.src('resources/completions/**', { base: '.' }));
if
(
platform
===
'
win32
'
)
{
result
=
es
.
merge
(
result
,
gulp
.
src
(
'
resources/win32/bin/code.js
'
,
{
base
:
'
resources/win32
'
}));
result
=
es
.
merge
(
result
,
gulp
.
src
(
'
resources/win32/bin/code.js
'
,
{
base
:
'
resources/win32
'
,
allowEmpty
:
true
}));
result
=
es
.
merge
(
result
,
gulp
.
src
(
'
resources/win32/bin/code.cmd
'
,
{
base
:
'
resources/win32
'
})
.
pipe
(
replace
(
'
@@NAME@@
'
,
product
.
nameShort
))
...
...
build/lib/optimize.js
浏览文件 @
a3099a85
...
...
@@ -114,7 +114,6 @@ function toBundleStream(src, bundledFileHeader, bundles) {
function
optimizeTask
(
opts
)
{
const
src
=
opts
.
src
;
const
entryPoints
=
opts
.
entryPoints
;
const
otherSources
=
opts
.
otherSources
;
const
resources
=
opts
.
resources
;
const
loaderConfig
=
opts
.
loaderConfig
;
const
bundledFileHeader
=
opts
.
header
;
...
...
@@ -137,7 +136,7 @@ function optimizeTask(opts) {
}
filteredResources
.
push
(
'
!
'
+
resource
);
});
gulp
.
src
(
filteredResources
,
{
base
:
`
${
src
}
`
}).
pipe
(
resourcesStream
);
gulp
.
src
(
filteredResources
,
{
base
:
`
${
src
}
`
,
allowEmpty
:
true
}).
pipe
(
resourcesStream
);
const
bundleInfoArray
=
[];
if
(
opts
.
bundleInfo
)
{
bundleInfoArray
.
push
(
new
VinylFile
({
...
...
@@ -148,20 +147,7 @@ function optimizeTask(opts) {
}
es
.
readArray
(
bundleInfoArray
).
pipe
(
bundleInfoStream
);
});
const
otherSourcesStream
=
es
.
through
();
const
otherSourcesStreamArr
=
[];
gulp
.
src
(
otherSources
,
{
base
:
`
${
src
}
`
})
.
pipe
(
es
.
through
(
function
(
data
)
{
otherSourcesStreamArr
.
push
(
toConcatStream
(
src
,
bundledFileHeader
,
[
data
],
data
.
relative
));
},
function
()
{
if
(
!
otherSourcesStreamArr
.
length
)
{
setTimeout
(
function
()
{
otherSourcesStream
.
emit
(
'
end
'
);
},
0
);
}
else
{
es
.
merge
(
otherSourcesStreamArr
).
pipe
(
otherSourcesStream
);
}
}));
const
result
=
es
.
merge
(
loader
(
src
,
bundledFileHeader
,
bundleLoader
),
bundlesStream
,
otherSourcesStream
,
resourcesStream
,
bundleInfoStream
);
const
result
=
es
.
merge
(
loader
(
src
,
bundledFileHeader
,
bundleLoader
),
bundlesStream
,
resourcesStream
,
bundleInfoStream
);
return
result
.
pipe
(
sourcemaps
.
write
(
'
./
'
,
{
sourceRoot
:
undefined
,
...
...
build/lib/optimize.ts
浏览文件 @
a3099a85
...
...
@@ -142,10 +142,6 @@ export interface IOptimizeTaskOpts {
* (for AMD files, will get bundled and get Copyright treatment)
*/
entryPoints
:
bundle
.
IEntryPoint
[];
/**
* (for non-AMD files that should get Copyright treatment)
*/
otherSources
:
string
[];
/**
* (svg, etc.)
*/
...
...
@@ -176,7 +172,6 @@ export interface IOptimizeTaskOpts {
export
function
optimizeTask
(
opts
:
IOptimizeTaskOpts
):
()
=>
NodeJS
.
ReadWriteStream
{
const
src
=
opts
.
src
;
const
entryPoints
=
opts
.
entryPoints
;
const
otherSources
=
opts
.
otherSources
;
const
resources
=
opts
.
resources
;
const
loaderConfig
=
opts
.
loaderConfig
;
const
bundledFileHeader
=
opts
.
header
;
...
...
@@ -201,7 +196,7 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr
}
filteredResources
.
push
(
'
!
'
+
resource
);
});
gulp
.
src
(
filteredResources
,
{
base
:
`
${
src
}
`
}).
pipe
(
resourcesStream
);
gulp
.
src
(
filteredResources
,
{
base
:
`
${
src
}
`
,
allowEmpty
:
true
}).
pipe
(
resourcesStream
);
const
bundleInfoArray
:
VinylFile
[]
=
[];
if
(
opts
.
bundleInfo
)
{
...
...
@@ -214,24 +209,9 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr
es
.
readArray
(
bundleInfoArray
).
pipe
(
bundleInfoStream
);
});
const
otherSourcesStream
=
es
.
through
();
const
otherSourcesStreamArr
:
NodeJS
.
ReadWriteStream
[]
=
[];
gulp
.
src
(
otherSources
,
{
base
:
`
${
src
}
`
})
.
pipe
(
es
.
through
(
function
(
data
)
{
otherSourcesStreamArr
.
push
(
toConcatStream
(
src
,
bundledFileHeader
,
[
data
],
data
.
relative
));
},
function
()
{
if
(
!
otherSourcesStreamArr
.
length
)
{
setTimeout
(
function
()
{
otherSourcesStream
.
emit
(
'
end
'
);
},
0
);
}
else
{
es
.
merge
(
otherSourcesStreamArr
).
pipe
(
otherSourcesStream
);
}
}));
const
result
=
es
.
merge
(
loader
(
src
,
bundledFileHeader
,
bundleLoader
),
bundlesStream
,
otherSourcesStream
,
resourcesStream
,
bundleInfoStream
);
...
...
package.json
浏览文件 @
a3099a85
...
...
@@ -83,23 +83,23 @@
"
express
"
:
"
^4.13.1
"
,
"
fancy-log
"
:
"
^1.3.3
"
,
"
glob
"
:
"
^5.0.13
"
,
"
gulp
"
:
"
^
3.8.9
"
,
"
gulp-atom-electron
"
:
"
^1.
19.2
"
,
"
gulp-azure-storage
"
:
"
^0.
8.2
"
,
"
gulp
"
:
"
^
4.0.0
"
,
"
gulp-atom-electron
"
:
"
^1.
20.0
"
,
"
gulp-azure-storage
"
:
"
^0.
10.0
"
,
"
gulp-buffer
"
:
"
0.0.2
"
,
"
gulp-concat
"
:
"
^2.6.
0
"
,
"
gulp-cssnano
"
:
"
^2.1.
0
"
,
"
gulp-eslint
"
:
"
^
3.0.1
"
,
"
gulp-filter
"
:
"
^
3.0
.0
"
,
"
gulp-flatmap
"
:
"
^1.0.
0
"
,
"
gulp-json-editor
"
:
"
^2.
2.1
"
,
"
gulp-concat
"
:
"
^2.6.
1
"
,
"
gulp-cssnano
"
:
"
^2.1.
3
"
,
"
gulp-eslint
"
:
"
^
5.0.0
"
,
"
gulp-filter
"
:
"
^
5.1
.0
"
,
"
gulp-flatmap
"
:
"
^1.0.
2
"
,
"
gulp-json-editor
"
:
"
^2.
5.0
"
,
"
gulp-plumber
"
:
"
^1.2.0
"
,
"
gulp-remote-src
"
:
"
^0.4.4
"
,
"
gulp-rename
"
:
"
^1.2.0
"
,
"
gulp-replace
"
:
"
^0.5.4
"
,
"
gulp-shell
"
:
"
^0.
5.2
"
,
"
gulp-tsb
"
:
"
2.0.
5
"
,
"
gulp-tslint
"
:
"
^8.1.
2
"
,
"
gulp-shell
"
:
"
^0.
6.5
"
,
"
gulp-tsb
"
:
"
2.0.
6
"
,
"
gulp-tslint
"
:
"
^8.1.
3
"
,
"
gulp-uglify
"
:
"
^3.0.0
"
,
"
gulp-vinyl-zip
"
:
"
^2.1.2
"
,
"
husky
"
:
"
^0.13.1
"
,
...
...
@@ -119,7 +119,7 @@
"
pump
"
:
"
^1.0.1
"
,
"
queue
"
:
"
3.0.6
"
,
"
rcedit
"
:
"
^1.1.0
"
,
"
remap-istanbul
"
:
"
^0.
6.4
"
,
"
remap-istanbul
"
:
"
^0.
13.0
"
,
"
rimraf
"
:
"
^2.2.8
"
,
"
sinon
"
:
"
^1.17.2
"
,
"
source-map
"
:
"
^0.4.4
"
,
...
...
@@ -130,10 +130,10 @@
"
typescript-tslint-plugin
"
:
"
^0.0.7
"
,
"
uglify-es
"
:
"
^3.0.18
"
,
"
underscore
"
:
"
^1.8.2
"
,
"
vinyl
"
:
"
^
0.4.5
"
,
"
vinyl-fs
"
:
"
^
2.4.3
"
,
"
vinyl
"
:
"
^
2.0.0
"
,
"
vinyl-fs
"
:
"
^
3.0.0
"
,
"
vsce
"
:
"
1.48.0
"
,
"
vscode-nls-dev
"
:
"
3.2.
2
"
,
"
vscode-nls-dev
"
:
"
3.2.
4
"
,
"
webpack
"
:
"
^4.16.5
"
,
"
webpack-cli
"
:
"
^3.1.0
"
,
"
webpack-stream
"
:
"
^5.1.1
"
...
...
src/main.js
浏览文件 @
a3099a85
...
...
@@ -305,7 +305,7 @@ function getNodeCachedDir() {
* @returns {string}
*/
function
stripComments
(
content
)
{
const
regexp
=
/
(
"
(?:[^\\
\"]
*
(?:\\
.
)?)
*"
)
|
(
'
(?:[^\
\\']
*
(?:\\
.
)?)
*'
)
|
(\/\*(?:\r?\n
|.
)
*
?\*\/)
|
(\/{2,}
.*
?(?:(?:\r?\n)
|$
))
/g
;
const
regexp
=
/
(
"
(?:[^\\
"
]
*
(?:\\
.
)?)
*"
)
|
(
'
(?:[^
\\
'
]
*
(?:\\
.
)?)
*'
)
|
(\/\*(?:\r?\n
|.
)
*
?\*\/)
|
(\/{2,}
.*
?(?:(?:\r?\n)
|$
))
/g
;
return
content
.
replace
(
regexp
,
function
(
match
,
m1
,
m2
,
m3
,
m4
)
{
// Only one of m1, m2, m3, m4 matches
...
...
src/vs/workbench/parts/webview/electron-browser/webview-pre.js
浏览文件 @
a3099a85
...
...
@@ -401,7 +401,7 @@
*/
function
getDefaultCss
(
styles
)
{
const
vars
=
Object
.
keys
(
styles
||
{}).
map
(
variable
=>
{
return
`--
${
variable
}
:
${
styles
[
variable
].
replace
(
/
[^
\#\"\'\,\.
a-z0-9
\-\(\
)]
/gi
,
''
)}
;`
;
return
`--
${
variable
}
:
${
styles
[
variable
].
replace
(
/
[^
#"',. a-z0-9
\-
(
)
]
/gi
,
''
)}
;`
;
});
return
`
:root {
${
vars
.
join
(
'
\n
'
)}
}
...
...
yarn.lock
浏览文件 @
a3099a85
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录