Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5e41d2aa
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,发现更多精彩内容 >>
提交
5e41d2aa
编写于
2月 01, 2018
作者:
E
Erich Gamma
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enable checkJS
上级
a36ef3d7
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
71 addition
and
24 deletion
+71
-24
build/builtin/browser-main.js
build/builtin/browser-main.js
+1
-0
build/gulpfile.editor.js
build/gulpfile.editor.js
+4
-1
build/gulpfile.extensions.js
build/gulpfile.extensions.js
+4
-0
build/gulpfile.hygiene.js
build/gulpfile.hygiene.js
+9
-4
build/gulpfile.mixin.js
build/gulpfile.mixin.js
+3
-0
build/gulpfile.vscode.js
build/gulpfile.vscode.js
+11
-2
build/gulpfile.vscode.linux.js
build/gulpfile.vscode.linux.js
+4
-1
build/gulpfile.vscode.win32.js
build/gulpfile.vscode.win32.js
+2
-0
build/lib/builtInExtensions.js
build/lib/builtInExtensions.js
+3
-1
build/lib/bundle.ts
build/lib/bundle.ts
+4
-4
build/lib/optimize.ts
build/lib/optimize.ts
+2
-2
build/lib/util.ts
build/lib/util.ts
+2
-2
build/lib/watch/watch-nsfw.js
build/lib/watch/watch-nsfw.js
+1
-1
build/lib/watch/watch-win32.js
build/lib/watch/watch-win32.js
+2
-1
build/npm/postinstall.js
build/npm/postinstall.js
+1
-0
build/npm/update-localization-extension.js
build/npm/update-localization-extension.js
+0
-1
build/package.json
build/package.json
+4
-3
build/tsconfig.build.json
build/tsconfig.build.json
+7
-0
build/tsconfig.json
build/tsconfig.json
+6
-1
src/buildfile.js
src/buildfile.js
+1
-0
未找到文件。
build/builtin/browser-main.js
浏览文件 @
5e41d2aa
...
@@ -13,6 +13,7 @@ const builtInExtensionsPath = path.join(__dirname, '..', 'builtInExtensions.json
...
@@ -13,6 +13,7 @@ const builtInExtensionsPath = path.join(__dirname, '..', 'builtInExtensions.json
const
controlFilePath
=
path
.
join
(
os
.
homedir
(),
'
.vscode-oss-dev
'
,
'
extensions
'
,
'
control.json
'
);
const
controlFilePath
=
path
.
join
(
os
.
homedir
(),
'
.vscode-oss-dev
'
,
'
extensions
'
,
'
control.json
'
);
function
readJson
(
filePath
)
{
function
readJson
(
filePath
)
{
//@ts-ignore review
return
JSON
.
parse
(
fs
.
readFileSync
(
filePath
));
return
JSON
.
parse
(
fs
.
readFileSync
(
filePath
));
}
}
...
...
build/gulpfile.editor.js
浏览文件 @
5e41d2aa
...
@@ -12,6 +12,7 @@ var File = require('vinyl');
...
@@ -12,6 +12,7 @@ var File = require('vinyl');
var
root
=
path
.
dirname
(
__dirname
);
var
root
=
path
.
dirname
(
__dirname
);
var
sha1
=
util
.
getVersion
(
root
);
var
sha1
=
util
.
getVersion
(
root
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
var
semver
=
require
(
'
./monaco/package.json
'
).
version
;
var
semver
=
require
(
'
./monaco/package.json
'
).
version
;
var
headerVersion
=
semver
+
'
(
'
+
sha1
+
'
)
'
;
var
headerVersion
=
semver
+
'
(
'
+
sha1
+
'
)
'
;
...
@@ -79,7 +80,8 @@ gulp.task('optimize-editor', ['clean-optimized-editor', 'compile-client-build'],
...
@@ -79,7 +80,8 @@ gulp.task('optimize-editor', ['clean-optimized-editor', 'compile-client-build'],
bundleLoader
:
false
,
bundleLoader
:
false
,
header
:
BUNDLED_FILE_HEADER
,
header
:
BUNDLED_FILE_HEADER
,
bundleInfo
:
true
,
bundleInfo
:
true
,
out
:
'
out-editor
'
out
:
'
out-editor
'
,
languages
:
undefined
}));
}));
gulp
.
task
(
'
clean-minified-editor
'
,
util
.
rimraf
(
'
out-editor-min
'
));
gulp
.
task
(
'
clean-minified-editor
'
,
util
.
rimraf
(
'
out-editor-min
'
));
...
@@ -155,6 +157,7 @@ gulp.task('editor-distro', ['clean-editor-distro', 'minify-editor', 'optimize-ed
...
@@ -155,6 +157,7 @@ gulp.task('editor-distro', ['clean-editor-distro', 'minify-editor', 'optimize-ed
});
});
gulp
.
task
(
'
analyze-editor-distro
'
,
function
()
{
gulp
.
task
(
'
analyze-editor-distro
'
,
function
()
{
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
var
bundleInfo
=
require
(
'
../out-editor/bundleInfo.json
'
);
var
bundleInfo
=
require
(
'
../out-editor/bundleInfo.json
'
);
var
graph
=
bundleInfo
.
graph
;
var
graph
=
bundleInfo
.
graph
;
var
bundles
=
bundleInfo
.
bundles
;
var
bundles
=
bundleInfo
.
bundles
;
...
...
build/gulpfile.extensions.js
浏览文件 @
5e41d2aa
...
@@ -94,8 +94,11 @@ const tasks = compilations.map(function (tsconfigFile) {
...
@@ -94,8 +94,11 @@ const tasks = compilations.map(function (tsconfigFile) {
sourceRoot
:
'
../src
'
sourceRoot
:
'
../src
'
}))
}))
.
pipe
(
tsFilter
.
restore
)
.
pipe
(
tsFilter
.
restore
)
// @ts-ignore review
.
pipe
(
build
?
nlsDev
.
createAdditionalLanguageFiles
(
languages
,
i18nPath
,
out
)
:
es
.
through
())
.
pipe
(
build
?
nlsDev
.
createAdditionalLanguageFiles
(
languages
,
i18nPath
,
out
)
:
es
.
through
())
// @ts-ignore review
.
pipe
(
build
?
nlsDev
.
bundleMetaDataFiles
(
headerId
,
headerOut
)
:
es
.
through
())
.
pipe
(
build
?
nlsDev
.
bundleMetaDataFiles
(
headerId
,
headerOut
)
:
es
.
through
())
// @ts-ignore review
.
pipe
(
build
?
nlsDev
.
bundleLanguageFiles
()
:
es
.
through
())
.
pipe
(
build
?
nlsDev
.
bundleLanguageFiles
()
:
es
.
through
())
.
pipe
(
reporter
.
end
(
emitError
));
.
pipe
(
reporter
.
end
(
emitError
));
...
@@ -143,6 +146,7 @@ const tasks = compilations.map(function (tsconfigFile) {
...
@@ -143,6 +146,7 @@ const tasks = compilations.map(function (tsconfigFile) {
const
watchInput
=
watcher
(
src
,
srcOpts
);
const
watchInput
=
watcher
(
src
,
srcOpts
);
return
watchInput
return
watchInput
// @ts-ignore review
.
pipe
(
util
.
incremental
(()
=>
pipeline
(
true
),
input
))
.
pipe
(
util
.
incremental
(()
=>
pipeline
(
true
),
input
))
.
pipe
(
gulp
.
dest
(
out
));
.
pipe
(
gulp
.
dest
(
out
));
});
});
...
...
build/gulpfile.hygiene.js
浏览文件 @
5e41d2aa
...
@@ -151,8 +151,8 @@ gulp.task('tslint', () => {
...
@@ -151,8 +151,8 @@ gulp.task('tslint', () => {
return
vfs
.
src
(
all
,
{
base
:
'
.
'
,
follow
:
true
,
allowEmpty
:
true
})
return
vfs
.
src
(
all
,
{
base
:
'
.
'
,
follow
:
true
,
allowEmpty
:
true
})
.
pipe
(
filter
(
tslintFilter
))
.
pipe
(
filter
(
tslintFilter
))
.
pipe
(
gulptslint
({
rulesDirectory
:
'
build/lib/tslint
'
}))
.
pipe
(
gulptslint
.
default
({
rulesDirectory
:
'
build/lib/tslint
'
}))
.
pipe
(
gulptslint
.
report
(
options
));
.
pipe
(
gulptslint
.
default
.
report
(
options
));
});
});
const
hygiene
=
exports
.
hygiene
=
(
some
,
options
)
=>
{
const
hygiene
=
exports
.
hygiene
=
(
some
,
options
)
=>
{
...
@@ -202,6 +202,11 @@ const hygiene = exports.hygiene = (some, options) => {
...
@@ -202,6 +202,11 @@ const hygiene = exports.hygiene = (some, options) => {
verify
:
true
,
verify
:
true
,
tsfmt
:
true
,
tsfmt
:
true
,
// verbose: true
// verbose: true
// keep checkJS happy
editorconfig
:
undefined
,
replace
:
undefined
,
tsconfig
:
undefined
,
tslint
:
undefined
}).
then
(
result
=>
{
}).
then
(
result
=>
{
if
(
result
.
error
)
{
if
(
result
.
error
)
{
console
.
error
(
result
.
message
);
console
.
error
(
result
.
message
);
...
@@ -227,9 +232,9 @@ const hygiene = exports.hygiene = (some, options) => {
...
@@ -227,9 +232,9 @@ const hygiene = exports.hygiene = (some, options) => {
const
tsl
=
es
.
through
(
function
(
file
)
{
const
tsl
=
es
.
through
(
function
(
file
)
{
const
configuration
=
tslint
.
Configuration
.
findConfiguration
(
null
,
'
.
'
);
const
configuration
=
tslint
.
Configuration
.
findConfiguration
(
null
,
'
.
'
);
const
options
=
{
formatter
:
'
json
'
,
rulesDirectory
:
'
build/lib/tslint
'
};
const
linterOptions
=
{
fix
:
false
,
formatter
:
'
json
'
,
rulesDirectory
:
'
build/lib/tslint
'
};
const
contents
=
file
.
contents
.
toString
(
'
utf8
'
);
const
contents
=
file
.
contents
.
toString
(
'
utf8
'
);
const
linter
=
new
tslint
.
Linter
(
o
ptions
);
const
linter
=
new
tslint
.
Linter
(
linterO
ptions
);
linter
.
lint
(
file
.
relative
,
contents
,
configuration
.
results
);
linter
.
lint
(
file
.
relative
,
contents
,
configuration
.
results
);
const
result
=
linter
.
getResult
();
const
result
=
linter
.
getResult
();
...
...
build/gulpfile.mixin.js
浏览文件 @
5e41d2aa
...
@@ -14,6 +14,8 @@ const util = require('./lib/util');
...
@@ -14,6 +14,8 @@ const util = require('./lib/util');
const
remote
=
require
(
'
gulp-remote-src
'
);
const
remote
=
require
(
'
gulp-remote-src
'
);
const
zip
=
require
(
'
gulp-vinyl-zip
'
);
const
zip
=
require
(
'
gulp-vinyl-zip
'
);
const
assign
=
require
(
'
object-assign
'
);
const
assign
=
require
(
'
object-assign
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
pkg
=
require
(
'
../package.json
'
);
const
pkg
=
require
(
'
../package.json
'
);
gulp
.
task
(
'
mixin
'
,
function
()
{
gulp
.
task
(
'
mixin
'
,
function
()
{
...
@@ -54,6 +56,7 @@ gulp.task('mixin', function () {
...
@@ -54,6 +56,7 @@ gulp.task('mixin', function () {
.
pipe
(
util
.
rebase
(
2
))
.
pipe
(
util
.
rebase
(
2
))
.
pipe
(
productJsonFilter
)
.
pipe
(
productJsonFilter
)
.
pipe
(
buffer
())
.
pipe
(
buffer
())
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
.
pipe
(
json
(
o
=>
assign
({},
require
(
'
../product.json
'
),
o
)))
.
pipe
(
json
(
o
=>
assign
({},
require
(
'
../product.json
'
),
o
)))
.
pipe
(
productJsonFilter
.
restore
);
.
pipe
(
productJsonFilter
.
restore
);
...
...
build/gulpfile.vscode.js
浏览文件 @
5e41d2aa
...
@@ -27,7 +27,9 @@ const common = require('./lib/optimize');
...
@@ -27,7 +27,9 @@ const common = require('./lib/optimize');
const
nlsDev
=
require
(
'
vscode-nls-dev
'
);
const
nlsDev
=
require
(
'
vscode-nls-dev
'
);
const
root
=
path
.
dirname
(
__dirname
);
const
root
=
path
.
dirname
(
__dirname
);
const
commit
=
util
.
getVersion
(
root
);
const
commit
=
util
.
getVersion
(
root
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
packageJson
=
require
(
'
../package.json
'
);
const
packageJson
=
require
(
'
../package.json
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
product
=
require
(
'
../product.json
'
);
const
product
=
require
(
'
../product.json
'
);
const
crypto
=
require
(
'
crypto
'
);
const
crypto
=
require
(
'
crypto
'
);
const
i18n
=
require
(
'
./lib/i18n
'
);
const
i18n
=
require
(
'
./lib/i18n
'
);
...
@@ -37,6 +39,7 @@ const getElectronVersion = require('./lib/electron').getElectronVersion;
...
@@ -37,6 +39,7 @@ const getElectronVersion = require('./lib/electron').getElectronVersion;
// const createAsar = require('./lib/asar').createAsar;
// const createAsar = require('./lib/asar').createAsar;
const
productionDependencies
=
deps
.
getProductionDependencies
(
path
.
dirname
(
__dirname
));
const
productionDependencies
=
deps
.
getProductionDependencies
(
path
.
dirname
(
__dirname
));
//@ts-ignore review
const
baseModules
=
Object
.
keys
(
process
.
binding
(
'
natives
'
)).
filter
(
n
=>
!
/^_|
\/
/
.
test
(
n
));
const
baseModules
=
Object
.
keys
(
process
.
binding
(
'
natives
'
)).
filter
(
n
=>
!
/^_|
\/
/
.
test
(
n
));
const
nodeModules
=
[
'
electron
'
,
'
original-fs
'
]
const
nodeModules
=
[
'
electron
'
,
'
original-fs
'
]
.
concat
(
Object
.
keys
(
product
.
dependencies
||
{}))
.
concat
(
Object
.
keys
(
product
.
dependencies
||
{}))
...
@@ -44,8 +47,8 @@ const nodeModules = ['electron', 'original-fs']
...
@@ -44,8 +47,8 @@ const nodeModules = ['electron', 'original-fs']
.
concat
(
baseModules
);
.
concat
(
baseModules
);
// Build
// Build
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
builtInExtensions
=
require
(
'
./builtInExtensions
'
);
const
builtInExtensions
=
require
(
'
./builtInExtensions
.json
'
);
const
excludedExtensions
=
[
const
excludedExtensions
=
[
'
vscode-api-tests
'
,
'
vscode-api-tests
'
,
...
@@ -104,6 +107,8 @@ gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compil
...
@@ -104,6 +107,8 @@ gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compil
header
:
BUNDLED_FILE_HEADER
,
header
:
BUNDLED_FILE_HEADER
,
out
:
'
out-vscode
'
,
out
:
'
out-vscode
'
,
languages
:
languages
,
languages
:
languages
,
// @ts-ignore review
bundleInfo
:
undefined
}));
}));
...
@@ -245,6 +250,7 @@ function packageTask(platform, arch, opts) {
...
@@ -245,6 +250,7 @@ function packageTask(platform, arch, opts) {
// // TODO@Dirk: this filter / buffer is here to make sure the nls.json files are buffered
// // TODO@Dirk: this filter / buffer is here to make sure the nls.json files are buffered
.
pipe
(
nlsFilter
)
.
pipe
(
nlsFilter
)
.
pipe
(
buffer
())
.
pipe
(
buffer
())
//@ts-ignore review
.
pipe
(
nlsDev
.
createAdditionalLanguageFiles
(
languages
,
path
.
join
(
__dirname
,
'
..
'
,
'
i18n
'
)))
.
pipe
(
nlsDev
.
createAdditionalLanguageFiles
(
languages
,
path
.
join
(
__dirname
,
'
..
'
,
'
i18n
'
)))
.
pipe
(
nlsFilter
.
restore
);
.
pipe
(
nlsFilter
.
restore
);
}));
}));
...
@@ -297,6 +303,7 @@ function packageTask(platform, arch, opts) {
...
@@ -297,6 +303,7 @@ function packageTask(platform, arch, opts) {
.
pipe
(
util
.
cleanNodeModule
(
'
native-is-elevated
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
src/**
'
,
'
deps/**
'
],
[
'
**/*.node
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
native-is-elevated
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
src/**
'
,
'
deps/**
'
],
[
'
**/*.node
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
native-watchdog
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
src/**
'
],
[
'
**/*.node
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
native-watchdog
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
src/**
'
],
[
'
**/*.node
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
spdlog
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
deps/**
'
,
'
src/**
'
,
'
test/**
'
],
[
'
**/*.node
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
spdlog
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
deps/**
'
,
'
src/**
'
,
'
test/**
'
],
[
'
**/*.node
'
]))
//@ts-ignore review
.
pipe
(
util
.
cleanNodeModule
(
'
jschardet
'
,
[
'
dist/**
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
jschardet
'
,
[
'
dist/**
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
windows-foreground-love
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
src/**
'
],
[
'
**/*.node
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
windows-foreground-love
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
src/**
'
],
[
'
**/*.node
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
windows-process-tree
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
src/**
'
],
[
'
**/*.node
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
windows-process-tree
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
src/**
'
],
[
'
**/*.node
'
]))
...
@@ -439,6 +446,7 @@ gulp.task('vscode-translations-pull', function () {
...
@@ -439,6 +446,7 @@ gulp.task('vscode-translations-pull', function () {
gulp
.
task
(
'
vscode-translations-import
'
,
function
()
{
gulp
.
task
(
'
vscode-translations-import
'
,
function
()
{
[...
i18n
.
defaultLanguages
,
...
i18n
.
extraLanguages
].
forEach
(
language
=>
{
[...
i18n
.
defaultLanguages
,
...
i18n
.
extraLanguages
].
forEach
(
language
=>
{
gulp
.
src
(
`../vscode-localization/
${
language
.
id
}
/build/*/*.xlf`
)
gulp
.
src
(
`../vscode-localization/
${
language
.
id
}
/build/*/*.xlf`
)
//@ts-ignore review
.
pipe
(
i18n
.
prepareI18nFiles
(
language
))
.
pipe
(
i18n
.
prepareI18nFiles
(
language
))
.
pipe
(
vfs
.
dest
(
`./i18n/
${
language
.
folderName
}
`
));
.
pipe
(
vfs
.
dest
(
`./i18n/
${
language
.
folderName
}
`
));
gulp
.
src
(
`../vscode-localization/
${
language
.
id
}
/setup/*/*.xlf`
)
gulp
.
src
(
`../vscode-localization/
${
language
.
id
}
/setup/*/*.xlf`
)
...
@@ -470,6 +478,7 @@ gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], () => {
...
@@ -470,6 +478,7 @@ gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], () => {
const
allConfigDetailsPath
=
path
.
join
(
os
.
tmpdir
(),
'
configuration.json
'
);
const
allConfigDetailsPath
=
path
.
join
(
os
.
tmpdir
(),
'
configuration.json
'
);
gulp
.
task
(
'
upload-vscode-configuration
'
,
[
'
generate-vscode-configuration
'
],
()
=>
{
gulp
.
task
(
'
upload-vscode-configuration
'
,
[
'
generate-vscode-configuration
'
],
()
=>
{
const
branch
=
process
.
env
.
BUILD_SOURCEBRANCH
;
const
branch
=
process
.
env
.
BUILD_SOURCEBRANCH
;
//@ts-ignore review
if
(
!
branch
.
endsWith
(
'
/master
'
)
&&
branch
.
indexOf
(
'
/release/
'
)
<
0
)
{
if
(
!
branch
.
endsWith
(
'
/master
'
)
&&
branch
.
indexOf
(
'
/release/
'
)
<
0
)
{
console
.
log
(
`Only runs on master and release branches, not
${
branch
}
`
);
console
.
log
(
`Only runs on master and release branches, not
${
branch
}
`
);
return
;
return
;
...
...
build/gulpfile.vscode.linux.js
浏览文件 @
5e41d2aa
...
@@ -12,9 +12,12 @@ const shell = require('gulp-shell');
...
@@ -12,9 +12,12 @@ const shell = require('gulp-shell');
const
es
=
require
(
'
event-stream
'
);
const
es
=
require
(
'
event-stream
'
);
const
vfs
=
require
(
'
vinyl-fs
'
);
const
vfs
=
require
(
'
vinyl-fs
'
);
const
util
=
require
(
'
./lib/util
'
);
const
util
=
require
(
'
./lib/util
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
packageJson
=
require
(
'
../package.json
'
);
const
packageJson
=
require
(
'
../package.json
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
product
=
require
(
'
../product.json
'
);
const
product
=
require
(
'
../product.json
'
);
const
rpmDependencies
=
require
(
'
../resources/linux/rpm/dependencies
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
rpmDependencies
=
require
(
'
../resources/linux/rpm/dependencies.json
'
);
const
linuxPackageRevision
=
Math
.
floor
(
new
Date
().
getTime
()
/
1000
);
const
linuxPackageRevision
=
Math
.
floor
(
new
Date
().
getTime
()
/
1000
);
...
...
build/gulpfile.vscode.win32.js
浏览文件 @
5e41d2aa
...
@@ -11,7 +11,9 @@ const assert = require('assert');
...
@@ -11,7 +11,9 @@ const assert = require('assert');
const
cp
=
require
(
'
child_process
'
);
const
cp
=
require
(
'
child_process
'
);
const
_7z
=
require
(
'
7zip
'
)[
'
7z
'
];
const
_7z
=
require
(
'
7zip
'
)[
'
7z
'
];
const
util
=
require
(
'
./lib/util
'
);
const
util
=
require
(
'
./lib/util
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
pkg
=
require
(
'
../package.json
'
);
const
pkg
=
require
(
'
../package.json
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
product
=
require
(
'
../product.json
'
);
const
product
=
require
(
'
../product.json
'
);
const
vfs
=
require
(
'
vinyl-fs
'
);
const
vfs
=
require
(
'
vinyl-fs
'
);
...
...
build/lib/builtInExtensions.js
浏览文件 @
5e41d2aa
...
@@ -17,7 +17,8 @@ const ext = require('./extensions');
...
@@ -17,7 +17,8 @@ const ext = require('./extensions');
const
util
=
require
(
'
gulp-util
'
);
const
util
=
require
(
'
gulp-util
'
);
const
root
=
path
.
dirname
(
path
.
dirname
(
__dirname
));
const
root
=
path
.
dirname
(
path
.
dirname
(
__dirname
));
const
builtInExtensions
=
require
(
'
../builtInExtensions
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
builtInExtensions
=
require
(
'
../builtInExtensions.json
'
);
const
controlFilePath
=
path
.
join
(
os
.
homedir
(),
'
.vscode-oss-dev
'
,
'
extensions
'
,
'
control.json
'
);
const
controlFilePath
=
path
.
join
(
os
.
homedir
(),
'
.vscode-oss-dev
'
,
'
extensions
'
,
'
control.json
'
);
function
getExtensionPath
(
extension
)
{
function
getExtensionPath
(
extension
)
{
...
@@ -34,6 +35,7 @@ function isUpToDate(extension) {
...
@@ -34,6 +35,7 @@ function isUpToDate(extension) {
const
packageContents
=
fs
.
readFileSync
(
packagePath
);
const
packageContents
=
fs
.
readFileSync
(
packagePath
);
try
{
try
{
//@ts-ignore review
const
diskVersion
=
JSON
.
parse
(
packageContents
).
version
;
const
diskVersion
=
JSON
.
parse
(
packageContents
).
version
;
return
(
diskVersion
===
extension
.
version
);
return
(
diskVersion
===
extension
.
version
);
}
catch
(
err
)
{
}
catch
(
err
)
{
...
...
build/lib/bundle.ts
浏览文件 @
5e41d2aa
...
@@ -44,11 +44,11 @@ interface ILoaderPluginReqFunc {
...
@@ -44,11 +44,11 @@ interface ILoaderPluginReqFunc {
export
interface
IEntryPoint
{
export
interface
IEntryPoint
{
name
:
string
;
name
:
string
;
include
:
string
[];
include
?
:
string
[];
exclude
:
string
[];
exclude
?
:
string
[];
prepend
:
string
[];
prepend
:
string
[];
append
:
string
[];
append
?
:
string
[];
dest
:
string
;
dest
?
:
string
;
}
}
interface
IEntryPointMap
{
interface
IEntryPointMap
{
...
...
build/lib/optimize.ts
浏览文件 @
5e41d2aa
...
@@ -30,7 +30,7 @@ function log(prefix: string, message: string): void {
...
@@ -30,7 +30,7 @@ function log(prefix: string, message: string): void {
gulpUtil
.
log
(
gulpUtil
.
colors
.
cyan
(
'
[
'
+
prefix
+
'
]
'
),
message
);
gulpUtil
.
log
(
gulpUtil
.
colors
.
cyan
(
'
[
'
+
prefix
+
'
]
'
),
message
);
}
}
export
function
loaderConfig
(
emptyPaths
:
string
[])
{
export
function
loaderConfig
(
emptyPaths
?
:
string
[])
{
const
result
=
{
const
result
=
{
paths
:
{
paths
:
{
'
vs
'
:
'
out-build/vs
'
,
'
vs
'
:
'
out-build/vs
'
,
...
@@ -293,7 +293,7 @@ function uglifyWithCopyrights(): NodeJS.ReadWriteStream {
...
@@ -293,7 +293,7 @@ function uglifyWithCopyrights(): NodeJS.ReadWriteStream {
return
es
.
duplex
(
input
,
output
);
return
es
.
duplex
(
input
,
output
);
}
}
export
function
minifyTask
(
src
:
string
,
sourceMapBaseUrl
:
string
):
(
cb
:
any
)
=>
void
{
export
function
minifyTask
(
src
:
string
,
sourceMapBaseUrl
?
:
string
):
(
cb
:
any
)
=>
void
{
const
sourceMappingURL
=
sourceMapBaseUrl
&&
(
f
=>
`
${
sourceMapBaseUrl
}
/
${
f
.
relative
}
.map`
);
const
sourceMappingURL
=
sourceMapBaseUrl
&&
(
f
=>
`
${
sourceMapBaseUrl
}
/
${
f
.
relative
}
.map`
);
return
cb
=>
{
return
cb
=>
{
...
...
build/lib/util.ts
浏览文件 @
5e41d2aa
...
@@ -28,7 +28,7 @@ export interface IStreamProvider {
...
@@ -28,7 +28,7 @@ export interface IStreamProvider {
(
cancellationToken
?:
ICancellationToken
):
NodeJS
.
ReadWriteStream
;
(
cancellationToken
?:
ICancellationToken
):
NodeJS
.
ReadWriteStream
;
}
}
export
function
incremental
(
streamProvider
:
IStreamProvider
,
initial
:
NodeJS
.
ReadWriteStream
,
supportsCancellation
:
boolean
):
NodeJS
.
ReadWriteStream
{
export
function
incremental
(
streamProvider
:
IStreamProvider
,
initial
:
NodeJS
.
ReadWriteStream
,
supportsCancellation
?
:
boolean
):
NodeJS
.
ReadWriteStream
{
const
input
=
es
.
through
();
const
input
=
es
.
through
();
const
output
=
es
.
through
();
const
output
=
es
.
through
();
let
state
=
'
idle
'
;
let
state
=
'
idle
'
;
...
@@ -223,7 +223,7 @@ export function rimraf(dir: string): (cb: any) => void {
...
@@ -223,7 +223,7 @@ export function rimraf(dir: string): (cb: any) => void {
_rimraf
(
dir
,
{
maxBusyTries
:
1
},
(
err
:
any
)
=>
{
_rimraf
(
dir
,
{
maxBusyTries
:
1
},
(
err
:
any
)
=>
{
if
(
!
err
)
{
if
(
!
err
)
{
return
cb
();
return
cb
();
}
;
}
if
(
err
.
code
===
'
ENOTEMPTY
'
&&
++
retries
<
5
)
{
if
(
err
.
code
===
'
ENOTEMPTY
'
&&
++
retries
<
5
)
{
return
setTimeout
(()
=>
retry
(
cb
),
10
);
return
setTimeout
(()
=>
retry
(
cb
),
10
);
...
...
build/lib/watch/watch-nsfw.js
浏览文件 @
5e41d2aa
...
@@ -30,7 +30,7 @@ function watch(root) {
...
@@ -30,7 +30,7 @@ function watch(root) {
path
:
path
,
path
:
path
,
base
:
root
base
:
root
});
});
//@ts-ignore review
file
.
event
=
type
;
file
.
event
=
type
;
result
.
emit
(
'
data
'
,
file
);
result
.
emit
(
'
data
'
,
file
);
}
}
...
...
build/lib/watch/watch-win32.js
浏览文件 @
5e41d2aa
...
@@ -25,6 +25,7 @@ function watch(root) {
...
@@ -25,6 +25,7 @@ function watch(root) {
var
child
=
cp
.
spawn
(
watcherPath
,
[
root
]);
var
child
=
cp
.
spawn
(
watcherPath
,
[
root
]);
child
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
child
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
//@ts-ignore review
var
lines
=
data
.
toString
(
'
utf8
'
).
split
(
'
\n
'
);
var
lines
=
data
.
toString
(
'
utf8
'
).
split
(
'
\n
'
);
for
(
var
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
var
line
=
lines
[
i
].
trim
();
var
line
=
lines
[
i
].
trim
();
...
@@ -46,7 +47,7 @@ function watch(root) {
...
@@ -46,7 +47,7 @@ function watch(root) {
path
:
changePathFull
,
path
:
changePathFull
,
base
:
root
base
:
root
});
});
//@ts-ignore review
file
.
event
=
toChangeType
(
changeType
);
file
.
event
=
toChangeType
(
changeType
);
result
.
emit
(
'
data
'
,
file
);
result
.
emit
(
'
data
'
,
file
);
}
}
...
...
build/npm/postinstall.js
浏览文件 @
5e41d2aa
...
@@ -49,6 +49,7 @@ extensions.forEach(extension => yarnInstall(`extensions/${extension}`));
...
@@ -49,6 +49,7 @@ extensions.forEach(extension => yarnInstall(`extensions/${extension}`));
function
yarnInstallBuildDependencies
()
{
function
yarnInstallBuildDependencies
()
{
// make sure we install the deps of build/lib/watch for the system installed
// make sure we install the deps of build/lib/watch for the system installed
// node, since that is the driver of gulp
// node, since that is the driver of gulp
//@ts-ignore review
const
env
=
Object
.
assign
({},
process
.
env
);
const
env
=
Object
.
assign
({},
process
.
env
);
const
watchPath
=
path
.
join
(
path
.
dirname
(
__dirname
),
'
lib
'
,
'
watch
'
);
const
watchPath
=
path
.
join
(
path
.
dirname
(
__dirname
),
'
lib
'
,
'
watch
'
);
const
yarnrcPath
=
path
.
join
(
watchPath
,
'
.yarnrc
'
);
const
yarnrcPath
=
path
.
join
(
watchPath
,
'
.yarnrc
'
);
...
...
build/npm/update-localization-extension.js
浏览文件 @
5e41d2aa
...
@@ -15,7 +15,6 @@ let rimraf = require('rimraf');
...
@@ -15,7 +15,6 @@ let rimraf = require('rimraf');
function
update
(
idOrPath
)
{
function
update
(
idOrPath
)
{
if
(
!
idOrPath
)
{
if
(
!
idOrPath
)
{
throw
new
Error
(
'
Argument must be the location of the localization extension.
'
);
throw
new
Error
(
'
Argument must be the location of the localization extension.
'
);
return
;
}
}
let
locExtFolder
=
idOrPath
;
let
locExtFolder
=
idOrPath
;
if
(
/^
\w{2}(
-
\w
+
)?
$/
.
test
(
idOrPath
))
{
if
(
/^
\w{2}(
-
\w
+
)?
$/
.
test
(
idOrPath
))
{
...
...
build/package.json
浏览文件 @
5e41d2aa
...
@@ -17,8 +17,9 @@
...
@@ -17,8 +17,9 @@
"xml2js"
:
"^0.4.17"
"xml2js"
:
"^0.4.17"
},
},
"scripts"
:
{
"scripts"
:
{
"compile"
:
"tsc"
,
"compile"
:
"tsc -p tsconfig.build.json"
,
"watch"
:
"tsc --watch"
,
"watch"
:
"tsc -p tsconfig.build.json --watch"
,
"postinstall"
:
"npm run compile"
"postinstall"
:
"npm run compile"
,
"npmCheckJs"
:
"tsc --noEmit"
}
}
}
}
\ No newline at end of file
build/tsconfig.build.json
0 → 100644
浏览文件 @
5e41d2aa
{
"extends"
:
"./tsconfig.json"
,
"compilerOptions"
:
{
"allowJs"
:
false
,
"checkJs"
:
false
}
}
\ No newline at end of file
build/tsconfig.json
浏览文件 @
5e41d2aa
...
@@ -7,7 +7,12 @@
...
@@ -7,7 +7,12 @@
"preserveConstEnums"
:
true
,
"preserveConstEnums"
:
true
,
"sourceMap"
:
false
,
"sourceMap"
:
false
,
"experimentalDecorators"
:
true
,
"experimentalDecorators"
:
true
,
"newLine"
:
"LF"
"newLine"
:
"LF"
,
//
enable
JavaScript
type
checking
for
the
language
service
//
use
the
tsconfig.build.json
for
compiling
wich
disable
JavaScript
//
type
checking
so
that
JavaScript
file
are
not
transpiled
"allowJs"
:
true
,
"checkJs"
:
true
},
},
"exclude"
:
[
"exclude"
:
[
"node_modules/**"
"node_modules/**"
...
...
src/buildfile.js
浏览文件 @
5e41d2aa
...
@@ -10,6 +10,7 @@ exports.base = [{
...
@@ -10,6 +10,7 @@ exports.base = [{
append
:
[
'
vs/base/worker/workerMain
'
],
append
:
[
'
vs/base/worker/workerMain
'
],
dest
:
'
vs/base/worker/workerMain.js
'
dest
:
'
vs/base/worker/workerMain.js
'
}];
}];
//@ts-ignore review
exports
.
workbench
=
require
(
'
./vs/workbench/buildfile
'
).
collectModules
([
'
vs/workbench/workbench.main
'
]);
exports
.
workbench
=
require
(
'
./vs/workbench/buildfile
'
).
collectModules
([
'
vs/workbench/workbench.main
'
]);
exports
.
code
=
require
(
'
./vs/code/buildfile
'
).
collectModules
();
exports
.
code
=
require
(
'
./vs/code/buildfile
'
).
collectModules
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录