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
const
controlFilePath
=
path
.
join
(
os
.
homedir
(),
'
.vscode-oss-dev
'
,
'
extensions
'
,
'
control.json
'
);
function
readJson
(
filePath
)
{
//@ts-ignore review
return
JSON
.
parse
(
fs
.
readFileSync
(
filePath
));
}
...
...
build/gulpfile.editor.js
浏览文件 @
5e41d2aa
...
...
@@ -12,6 +12,7 @@ var File = require('vinyl');
var
root
=
path
.
dirname
(
__dirname
);
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
headerVersion
=
semver
+
'
(
'
+
sha1
+
'
)
'
;
...
...
@@ -79,7 +80,8 @@ gulp.task('optimize-editor', ['clean-optimized-editor', 'compile-client-build'],
bundleLoader
:
false
,
header
:
BUNDLED_FILE_HEADER
,
bundleInfo
:
true
,
out
:
'
out-editor
'
out
:
'
out-editor
'
,
languages
:
undefined
}));
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
});
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
graph
=
bundleInfo
.
graph
;
var
bundles
=
bundleInfo
.
bundles
;
...
...
build/gulpfile.extensions.js
浏览文件 @
5e41d2aa
...
...
@@ -94,8 +94,11 @@ const tasks = compilations.map(function (tsconfigFile) {
sourceRoot
:
'
../src
'
}))
.
pipe
(
tsFilter
.
restore
)
// @ts-ignore review
.
pipe
(
build
?
nlsDev
.
createAdditionalLanguageFiles
(
languages
,
i18nPath
,
out
)
:
es
.
through
())
// @ts-ignore review
.
pipe
(
build
?
nlsDev
.
bundleMetaDataFiles
(
headerId
,
headerOut
)
:
es
.
through
())
// @ts-ignore review
.
pipe
(
build
?
nlsDev
.
bundleLanguageFiles
()
:
es
.
through
())
.
pipe
(
reporter
.
end
(
emitError
));
...
...
@@ -143,6 +146,7 @@ const tasks = compilations.map(function (tsconfigFile) {
const
watchInput
=
watcher
(
src
,
srcOpts
);
return
watchInput
// @ts-ignore review
.
pipe
(
util
.
incremental
(()
=>
pipeline
(
true
),
input
))
.
pipe
(
gulp
.
dest
(
out
));
});
...
...
build/gulpfile.hygiene.js
浏览文件 @
5e41d2aa
...
...
@@ -151,8 +151,8 @@ gulp.task('tslint', () => {
return
vfs
.
src
(
all
,
{
base
:
'
.
'
,
follow
:
true
,
allowEmpty
:
true
})
.
pipe
(
filter
(
tslintFilter
))
.
pipe
(
gulptslint
({
rulesDirectory
:
'
build/lib/tslint
'
}))
.
pipe
(
gulptslint
.
report
(
options
));
.
pipe
(
gulptslint
.
default
({
rulesDirectory
:
'
build/lib/tslint
'
}))
.
pipe
(
gulptslint
.
default
.
report
(
options
));
});
const
hygiene
=
exports
.
hygiene
=
(
some
,
options
)
=>
{
...
...
@@ -202,6 +202,11 @@ const hygiene = exports.hygiene = (some, options) => {
verify
:
true
,
tsfmt
:
true
,
// verbose: true
// keep checkJS happy
editorconfig
:
undefined
,
replace
:
undefined
,
tsconfig
:
undefined
,
tslint
:
undefined
}).
then
(
result
=>
{
if
(
result
.
error
)
{
console
.
error
(
result
.
message
);
...
...
@@ -227,9 +232,9 @@ const hygiene = exports.hygiene = (some, options) => {
const
tsl
=
es
.
through
(
function
(
file
)
{
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
linter
=
new
tslint
.
Linter
(
o
ptions
);
const
linter
=
new
tslint
.
Linter
(
linterO
ptions
);
linter
.
lint
(
file
.
relative
,
contents
,
configuration
.
results
);
const
result
=
linter
.
getResult
();
...
...
build/gulpfile.mixin.js
浏览文件 @
5e41d2aa
...
...
@@ -14,6 +14,8 @@ const util = require('./lib/util');
const
remote
=
require
(
'
gulp-remote-src
'
);
const
zip
=
require
(
'
gulp-vinyl-zip
'
);
const
assign
=
require
(
'
object-assign
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
pkg
=
require
(
'
../package.json
'
);
gulp
.
task
(
'
mixin
'
,
function
()
{
...
...
@@ -54,6 +56,7 @@ gulp.task('mixin', function () {
.
pipe
(
util
.
rebase
(
2
))
.
pipe
(
productJsonFilter
)
.
pipe
(
buffer
())
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
.
pipe
(
json
(
o
=>
assign
({},
require
(
'
../product.json
'
),
o
)))
.
pipe
(
productJsonFilter
.
restore
);
...
...
build/gulpfile.vscode.js
浏览文件 @
5e41d2aa
...
...
@@ -27,7 +27,9 @@ const common = require('./lib/optimize');
const
nlsDev
=
require
(
'
vscode-nls-dev
'
);
const
root
=
path
.
dirname
(
__dirname
);
const
commit
=
util
.
getVersion
(
root
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
packageJson
=
require
(
'
../package.json
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
product
=
require
(
'
../product.json
'
);
const
crypto
=
require
(
'
crypto
'
);
const
i18n
=
require
(
'
./lib/i18n
'
);
...
...
@@ -37,6 +39,7 @@ const getElectronVersion = require('./lib/electron').getElectronVersion;
// const createAsar = require('./lib/asar').createAsar;
const
productionDependencies
=
deps
.
getProductionDependencies
(
path
.
dirname
(
__dirname
));
//@ts-ignore review
const
baseModules
=
Object
.
keys
(
process
.
binding
(
'
natives
'
)).
filter
(
n
=>
!
/^_|
\/
/
.
test
(
n
));
const
nodeModules
=
[
'
electron
'
,
'
original-fs
'
]
.
concat
(
Object
.
keys
(
product
.
dependencies
||
{}))
...
...
@@ -44,8 +47,8 @@ const nodeModules = ['electron', 'original-fs']
.
concat
(
baseModules
);
// Build
const
builtInExtensions
=
require
(
'
./builtInExtensions
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
builtInExtensions
=
require
(
'
./builtInExtensions
.json
'
);
const
excludedExtensions
=
[
'
vscode-api-tests
'
,
...
...
@@ -104,6 +107,8 @@ gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compil
header
:
BUNDLED_FILE_HEADER
,
out
:
'
out-vscode
'
,
languages
:
languages
,
// @ts-ignore review
bundleInfo
:
undefined
}));
...
...
@@ -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
.
pipe
(
nlsFilter
)
.
pipe
(
buffer
())
//@ts-ignore review
.
pipe
(
nlsDev
.
createAdditionalLanguageFiles
(
languages
,
path
.
join
(
__dirname
,
'
..
'
,
'
i18n
'
)))
.
pipe
(
nlsFilter
.
restore
);
}));
...
...
@@ -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-watchdog
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
src/**
'
],
[
'
**/*.node
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
spdlog
'
,
[
'
binding.gyp
'
,
'
build/**
'
,
'
deps/**
'
,
'
src/**
'
,
'
test/**
'
],
[
'
**/*.node
'
]))
//@ts-ignore review
.
pipe
(
util
.
cleanNodeModule
(
'
jschardet
'
,
[
'
dist/**
'
]))
.
pipe
(
util
.
cleanNodeModule
(
'
windows-foreground-love
'
,
[
'
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 () {
gulp
.
task
(
'
vscode-translations-import
'
,
function
()
{
[...
i18n
.
defaultLanguages
,
...
i18n
.
extraLanguages
].
forEach
(
language
=>
{
gulp
.
src
(
`../vscode-localization/
${
language
.
id
}
/build/*/*.xlf`
)
//@ts-ignore review
.
pipe
(
i18n
.
prepareI18nFiles
(
language
))
.
pipe
(
vfs
.
dest
(
`./i18n/
${
language
.
folderName
}
`
));
gulp
.
src
(
`../vscode-localization/
${
language
.
id
}
/setup/*/*.xlf`
)
...
...
@@ -470,6 +478,7 @@ gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], () => {
const
allConfigDetailsPath
=
path
.
join
(
os
.
tmpdir
(),
'
configuration.json
'
);
gulp
.
task
(
'
upload-vscode-configuration
'
,
[
'
generate-vscode-configuration
'
],
()
=>
{
const
branch
=
process
.
env
.
BUILD_SOURCEBRANCH
;
//@ts-ignore review
if
(
!
branch
.
endsWith
(
'
/master
'
)
&&
branch
.
indexOf
(
'
/release/
'
)
<
0
)
{
console
.
log
(
`Only runs on master and release branches, not
${
branch
}
`
);
return
;
...
...
build/gulpfile.vscode.linux.js
浏览文件 @
5e41d2aa
...
...
@@ -12,9 +12,12 @@ const shell = require('gulp-shell');
const
es
=
require
(
'
event-stream
'
);
const
vfs
=
require
(
'
vinyl-fs
'
);
const
util
=
require
(
'
./lib/util
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
packageJson
=
require
(
'
../package.json
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
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
);
...
...
build/gulpfile.vscode.win32.js
浏览文件 @
5e41d2aa
...
...
@@ -11,7 +11,9 @@ const assert = require('assert');
const
cp
=
require
(
'
child_process
'
);
const
_7z
=
require
(
'
7zip
'
)[
'
7z
'
];
const
util
=
require
(
'
./lib/util
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
pkg
=
require
(
'
../package.json
'
);
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
product
=
require
(
'
../product.json
'
);
const
vfs
=
require
(
'
vinyl-fs
'
);
...
...
build/lib/builtInExtensions.js
浏览文件 @
5e41d2aa
...
...
@@ -17,7 +17,8 @@ const ext = require('./extensions');
const
util
=
require
(
'
gulp-util
'
);
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
'
);
function
getExtensionPath
(
extension
)
{
...
...
@@ -34,6 +35,7 @@ function isUpToDate(extension) {
const
packageContents
=
fs
.
readFileSync
(
packagePath
);
try
{
//@ts-ignore review
const
diskVersion
=
JSON
.
parse
(
packageContents
).
version
;
return
(
diskVersion
===
extension
.
version
);
}
catch
(
err
)
{
...
...
build/lib/bundle.ts
浏览文件 @
5e41d2aa
...
...
@@ -44,11 +44,11 @@ interface ILoaderPluginReqFunc {
export
interface
IEntryPoint
{
name
:
string
;
include
:
string
[];
exclude
:
string
[];
include
?
:
string
[];
exclude
?
:
string
[];
prepend
:
string
[];
append
:
string
[];
dest
:
string
;
append
?
:
string
[];
dest
?
:
string
;
}
interface
IEntryPointMap
{
...
...
build/lib/optimize.ts
浏览文件 @
5e41d2aa
...
...
@@ -30,7 +30,7 @@ function log(prefix: string, message: string): void {
gulpUtil
.
log
(
gulpUtil
.
colors
.
cyan
(
'
[
'
+
prefix
+
'
]
'
),
message
);
}
export
function
loaderConfig
(
emptyPaths
:
string
[])
{
export
function
loaderConfig
(
emptyPaths
?
:
string
[])
{
const
result
=
{
paths
:
{
'
vs
'
:
'
out-build/vs
'
,
...
...
@@ -293,7 +293,7 @@ function uglifyWithCopyrights(): NodeJS.ReadWriteStream {
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`
);
return
cb
=>
{
...
...
build/lib/util.ts
浏览文件 @
5e41d2aa
...
...
@@ -28,7 +28,7 @@ export interface IStreamProvider {
(
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
output
=
es
.
through
();
let
state
=
'
idle
'
;
...
...
@@ -223,7 +223,7 @@ export function rimraf(dir: string): (cb: any) => void {
_rimraf
(
dir
,
{
maxBusyTries
:
1
},
(
err
:
any
)
=>
{
if
(
!
err
)
{
return
cb
();
}
;
}
if
(
err
.
code
===
'
ENOTEMPTY
'
&&
++
retries
<
5
)
{
return
setTimeout
(()
=>
retry
(
cb
),
10
);
...
...
build/lib/watch/watch-nsfw.js
浏览文件 @
5e41d2aa
...
...
@@ -30,7 +30,7 @@ function watch(root) {
path
:
path
,
base
:
root
});
//@ts-ignore review
file
.
event
=
type
;
result
.
emit
(
'
data
'
,
file
);
}
...
...
build/lib/watch/watch-win32.js
浏览文件 @
5e41d2aa
...
...
@@ -25,6 +25,7 @@ function watch(root) {
var
child
=
cp
.
spawn
(
watcherPath
,
[
root
]);
child
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
//@ts-ignore review
var
lines
=
data
.
toString
(
'
utf8
'
).
split
(
'
\n
'
);
for
(
var
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
var
line
=
lines
[
i
].
trim
();
...
...
@@ -46,7 +47,7 @@ function watch(root) {
path
:
changePathFull
,
base
:
root
});
//@ts-ignore review
file
.
event
=
toChangeType
(
changeType
);
result
.
emit
(
'
data
'
,
file
);
}
...
...
build/npm/postinstall.js
浏览文件 @
5e41d2aa
...
...
@@ -49,6 +49,7 @@ extensions.forEach(extension => yarnInstall(`extensions/${extension}`));
function
yarnInstallBuildDependencies
()
{
// make sure we install the deps of build/lib/watch for the system installed
// node, since that is the driver of gulp
//@ts-ignore review
const
env
=
Object
.
assign
({},
process
.
env
);
const
watchPath
=
path
.
join
(
path
.
dirname
(
__dirname
),
'
lib
'
,
'
watch
'
);
const
yarnrcPath
=
path
.
join
(
watchPath
,
'
.yarnrc
'
);
...
...
build/npm/update-localization-extension.js
浏览文件 @
5e41d2aa
...
...
@@ -15,7 +15,6 @@ let rimraf = require('rimraf');
function
update
(
idOrPath
)
{
if
(
!
idOrPath
)
{
throw
new
Error
(
'
Argument must be the location of the localization extension.
'
);
return
;
}
let
locExtFolder
=
idOrPath
;
if
(
/^
\w{2}(
-
\w
+
)?
$/
.
test
(
idOrPath
))
{
...
...
build/package.json
浏览文件 @
5e41d2aa
...
...
@@ -17,8 +17,9 @@
"xml2js"
:
"^0.4.17"
},
"scripts"
:
{
"compile"
:
"tsc"
,
"watch"
:
"tsc --watch"
,
"postinstall"
:
"npm run compile"
"compile"
:
"tsc -p tsconfig.build.json"
,
"watch"
:
"tsc -p tsconfig.build.json --watch"
,
"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 @@
"preserveConstEnums"
:
true
,
"sourceMap"
:
false
,
"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"
:
[
"node_modules/**"
...
...
src/buildfile.js
浏览文件 @
5e41d2aa
...
...
@@ -10,6 +10,7 @@ exports.base = [{
append
:
[
'
vs/base/worker/workerMain
'
],
dest
:
'
vs/base/worker/workerMain.js
'
}];
//@ts-ignore review
exports
.
workbench
=
require
(
'
./vs/workbench/buildfile
'
).
collectModules
([
'
vs/workbench/workbench.main
'
]);
exports
.
code
=
require
(
'
./vs/code/buildfile
'
).
collectModules
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录