Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
545af1f1
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
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,发现更多精彩内容 >>
提交
545af1f1
编写于
5月 23, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove vs/text loader plugin
上级
742f017f
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
154 addition
and
217 deletion
+154
-217
build/gulpfile.common.js
build/gulpfile.common.js
+0
-7
build/gulpfile.editor.js
build/gulpfile.editor.js
+1
-2
build/gulpfile.hygiene.js
build/gulpfile.hygiene.js
+0
-1
src/buildfile.js
src/buildfile.js
+1
-1
src/vs/base/buildfile.js
src/vs/base/buildfile.js
+2
-2
src/vs/code/buildfile.js
src/vs/code/buildfile.js
+1
-1
src/vs/editor/buildfile.js
src/vs/editor/buildfile.js
+2
-2
src/vs/languages/buildfile-editor-languages.js
src/vs/languages/buildfile-editor-languages.js
+4
-4
src/vs/languages/buildfile.js
src/vs/languages/buildfile.js
+1
-1
src/vs/languages/typescript/common/lib/generate.js
src/vs/languages/typescript/common/lib/generate.js
+94
-0
src/vs/languages/typescript/common/lib/lib-es6-ts.d.ts
src/vs/languages/typescript/common/lib/lib-es6-ts.d.ts
+6
-0
src/vs/languages/typescript/common/lib/lib-es6-ts.js
src/vs/languages/typescript/common/lib/lib-es6-ts.js
+9
-0
src/vs/languages/typescript/common/lib/lib-ts.d.ts
src/vs/languages/typescript/common/lib/lib-ts.d.ts
+6
-0
src/vs/languages/typescript/common/lib/lib-ts.js
src/vs/languages/typescript/common/lib/lib-ts.js
+9
-0
src/vs/languages/typescript/common/worker.ts
src/vs/languages/typescript/common/worker.ts
+17
-8
src/vs/text.js
src/vs/text.js
+0
-186
src/vs/workbench/buildfile.js
src/vs/workbench/buildfile.js
+1
-1
src/vs/workbench/parts/html/browser/webview.ts
src/vs/workbench/parts/html/browser/webview.ts
+0
-1
未找到文件。
build/gulpfile.common.js
浏览文件 @
545af1f1
...
...
@@ -33,14 +33,8 @@ exports.loaderConfig = function (emptyPaths) {
var
result
=
{
paths
:
{
'
vs
'
:
'
out-build/vs
'
,
'
vs/extensions
'
:
'
extensions
'
,
'
vscode
'
:
'
empty:
'
},
'
vs/text
'
:
{
paths
:
{
'
vs/extensions
'
:
'
extensions
'
}
},
nodeModules
:
emptyPaths
||
[]
};
...
...
@@ -55,7 +49,6 @@ function loader(bundledFileHeader) {
'
out-build/vs/loader.js
'
,
'
out-build/vs/css.js
'
,
'
out-build/vs/nls.js
'
,
'
out-build/vs/text.js
'
],
{
base
:
'
out-build
'
})
.
pipe
(
es
.
through
(
function
(
data
)
{
if
(
isFirst
)
{
...
...
build/gulpfile.editor.js
浏览文件 @
545af1f1
...
...
@@ -34,8 +34,7 @@ var editorResources = [
var
editorOtherSources
=
[
'
out-build/vs/css.js
'
,
'
out-build/vs/nls.js
'
,
'
out-build/vs/text.js
'
'
out-build/vs/nls.js
'
];
var
BUNDLED_FILE_HEADER
=
[
...
...
build/gulpfile.hygiene.js
浏览文件 @
545af1f1
...
...
@@ -48,7 +48,6 @@ var indentationFilter = [
'
!**/vs/base/common/marked/raw.marked.js
'
,
'
!**/vs/base/common/winjs.base.raw.js
'
,
'
!**/vs/base/node/terminateProcess.sh
'
,
'
!**/vs/text.js
'
,
'
!**/vs/nls.js
'
,
'
!**/vs/css.js
'
,
'
!**/vs/loader.js
'
,
...
...
src/buildfile.js
浏览文件 @
545af1f1
...
...
@@ -12,5 +12,5 @@ exports.standaloneLanguages = require('./vs/editor/standalone-languages/buildfil
exports
.
standaloneLanguages2
=
require
(
'
./vs/languages/buildfile-editor-languages
'
).
collectModules
();
exports
.
entrypoint
=
function
(
name
)
{
return
[{
name
:
name
,
include
:
[],
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
]
}];
return
[{
name
:
name
,
include
:
[],
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
]
}];
};
src/vs/base/buildfile.js
浏览文件 @
545af1f1
...
...
@@ -8,9 +8,9 @@
exports
.
collectModules
=
function
()
{
return
[{
name
:
'
vs/base/common/worker/workerServer
'
,
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
]
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
]
},
{
name
:
'
vs/base/common/worker/simpleWorker
'
,
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
]
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
]
}];
};
src/vs/code/buildfile.js
浏览文件 @
545af1f1
...
...
@@ -6,7 +6,7 @@
function
createModuleDescription
(
name
,
exclude
)
{
var
result
=
{};
var
excludes
=
[
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
];
var
excludes
=
[
'
vs/css
'
,
'
vs/nls
'
];
result
.
name
=
name
;
if
(
Array
.
isArray
(
exclude
)
&&
exclude
.
length
>
0
)
{
excludes
=
excludes
.
concat
(
exclude
);
...
...
src/vs/editor/buildfile.js
浏览文件 @
545af1f1
...
...
@@ -9,9 +9,9 @@ exports.collectModules = function() {
return
[{
name
:
'
vs/editor/common/worker/editorWorkerServer
'
,
include
:
[
'
vs/base/common/severity
'
],
exclude
:
[
'
vs/base/common/worker/workerServer
'
,
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
]
exclude
:
[
'
vs/base/common/worker/workerServer
'
,
'
vs/css
'
,
'
vs/nls
'
]
},
{
name
:
'
vs/editor/common/services/editorSimpleWorker
'
,
exclude
:
[
'
vs/base/common/worker/simpleWorker
'
,
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
]
exclude
:
[
'
vs/base/common/worker/simpleWorker
'
,
'
vs/css
'
,
'
vs/nls
'
]
}];
};
src/vs/languages/buildfile-editor-languages.js
浏览文件 @
545af1f1
...
...
@@ -23,7 +23,7 @@ var EntryPoint = (function() {
excludes
=
toArray
(
excludes
);
this
.
result
.
push
({
name
:
moduleId
,
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
].
concat
(
this
.
modules
).
concat
(
excludes
)
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
].
concat
(
this
.
modules
).
concat
(
excludes
)
});
return
new
EntryPoint
(
this
.
result
,
this
.
modules
.
concat
([
moduleId
].
concat
(
excludes
)));
};
...
...
@@ -48,17 +48,17 @@ exports.collectModules = function(args) {
result
.
push
({
name
:
'
vs/languages/typescript/common/lib/typescriptServices
'
,
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
]
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
]
});
result
.
push
({
name
:
'
vs/languages/typescript/common/worker
'
,
exclude
:
[
'
vs/base/common/worker/simpleWorker
'
,
'
vs/languages/typescript/common/lib/typescriptServices
'
,
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
]
exclude
:
[
'
vs/base/common/worker/simpleWorker
'
,
'
vs/languages/typescript/common/lib/typescriptServices
'
,
'
vs/css
'
,
'
vs/nls
'
]
});
result
.
push
({
name
:
'
vs/languages/typescript/common/mode
'
,
exclude
:
[
'
vs/editor/editor.main
'
,
'
vs/languages/typescript/common/lib/typescriptServices
'
,
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
]
exclude
:
[
'
vs/editor/editor.main
'
,
'
vs/languages/typescript/common/lib/typescriptServices
'
,
'
vs/css
'
,
'
vs/nls
'
]
});
return
result
;
...
...
src/vs/languages/buildfile.js
浏览文件 @
545af1f1
...
...
@@ -23,7 +23,7 @@ var EntryPoint = (function() {
excludes
=
toArray
(
excludes
);
this
.
result
.
push
({
name
:
moduleId
,
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
].
concat
(
this
.
modules
).
concat
(
excludes
)
exclude
:
[
'
vs/css
'
,
'
vs/nls
'
].
concat
(
this
.
modules
).
concat
(
excludes
)
});
return
new
EntryPoint
(
this
.
result
,
this
.
modules
.
concat
([
moduleId
].
concat
(
excludes
)));
};
...
...
src/vs/languages/typescript/common/lib/generate.js
0 → 100644
浏览文件 @
545af1f1
var
fs
=
require
(
'
fs
'
);
var
path
=
require
(
'
path
'
);
toString
(
path
.
join
(
__dirname
,
'
lib.d.ts
'
),
path
.
join
(
__dirname
,
'
lib-ts.js
'
));
toString
(
path
.
join
(
__dirname
,
'
lib.es6.d.ts
'
),
path
.
join
(
__dirname
,
'
lib-es6-ts.js
'
));
function
toString
(
source
,
dest
)
{
var
contents
=
fs
.
readFileSync
(
source
).
toString
();
fs
.
writeFileSync
(
dest
,
`/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// This is a generated file from
${
path
.
basename
(
source
)}
define([], { contents: "
${
escapeText
(
contents
)}
"});
`
)
}
/**
* Escape text such that it can be used in a javascript string enclosed by double quotes (")
*/
function
escapeText
(
text
)
{
// http://www.javascriptkit.com/jsref/escapesequence.shtml
// \b Backspace.
// \f Form feed.
// \n Newline.
// \O Nul character.
// \r Carriage return.
// \t Horizontal tab.
// \v Vertical tab.
// \' Single quote or apostrophe.
// \" Double quote.
// \\ Backslash.
// \ddd The Latin-1 character specified by the three octal digits between 0 and 377. ie, copyright symbol is \251.
// \xdd The Latin-1 character specified by the two hexadecimal digits dd between 00 and FF. ie, copyright symbol is \xA9.
// \udddd The Unicode character specified by the four hexadecimal digits dddd. ie, copyright symbol is \u00A9.
var
_backspace
=
'
\
b
'
.
charCodeAt
(
0
);
var
_formFeed
=
'
\
f
'
.
charCodeAt
(
0
);
var
_newLine
=
'
\n
'
.
charCodeAt
(
0
);
var
_nullChar
=
0
;
var
_carriageReturn
=
'
\r
'
.
charCodeAt
(
0
);
var
_tab
=
'
\t
'
.
charCodeAt
(
0
);
var
_verticalTab
=
'
\
v
'
.
charCodeAt
(
0
);
var
_backslash
=
'
\\
'
.
charCodeAt
(
0
);
var
_doubleQuote
=
'
"
'
.
charCodeAt
(
0
);
var
startPos
=
0
,
chrCode
,
replaceWith
=
null
,
resultPieces
=
[];
for
(
var
i
=
0
,
len
=
text
.
length
;
i
<
len
;
i
++
)
{
chrCode
=
text
.
charCodeAt
(
i
);
switch
(
chrCode
)
{
case
_backspace
:
replaceWith
=
'
\\
b
'
;
break
;
case
_formFeed
:
replaceWith
=
'
\\
f
'
;
break
;
case
_newLine
:
replaceWith
=
'
\\
n
'
;
break
;
case
_nullChar
:
replaceWith
=
'
\\
0
'
;
break
;
case
_carriageReturn
:
replaceWith
=
'
\\
r
'
;
break
;
case
_tab
:
replaceWith
=
'
\\
t
'
;
break
;
case
_verticalTab
:
replaceWith
=
'
\\
v
'
;
break
;
case
_backslash
:
replaceWith
=
'
\\\\
'
;
break
;
case
_doubleQuote
:
replaceWith
=
'
\\
"
'
;
break
;
}
if
(
replaceWith
!==
null
)
{
resultPieces
.
push
(
text
.
substring
(
startPos
,
i
));
resultPieces
.
push
(
replaceWith
);
startPos
=
i
+
1
;
replaceWith
=
null
;
}
}
resultPieces
.
push
(
text
.
substring
(
startPos
,
len
));
return
resultPieces
.
join
(
''
);
}
src/vs/languages/typescript/common/lib/lib-es6-ts.d.ts
0 → 100644
浏览文件 @
545af1f1
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export
declare
var
contents
:
string
;
\ No newline at end of file
src/vs/languages/typescript/common/lib/lib-es6-ts.js
0 → 100644
浏览文件 @
545af1f1
此差异已折叠。
点击以展开。
src/vs/languages/typescript/common/lib/lib-ts.d.ts
0 → 100644
浏览文件 @
545af1f1
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export
declare
var
contents
:
string
;
\ No newline at end of file
src/vs/languages/typescript/common/lib/lib-ts.js
0 → 100644
浏览文件 @
545af1f1
此差异已折叠。
点击以展开。
src/vs/languages/typescript/common/worker.ts
浏览文件 @
545af1f1
...
...
@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
'
vs/text!vs/languages/typescript/common/lib/lib.d.
ts
'
;
import
'
vs/text!vs/languages/typescript/common/lib/lib.es6.d.
ts
'
;
import
{
contents
as
libdts
}
from
'
vs/languages/typescript/common/lib/lib-
ts
'
;
import
{
contents
as
libes6ts
}
from
'
vs/languages/typescript/common/lib/lib-es6-
ts
'
;
import
*
as
ts
from
'
vs/languages/typescript/common/lib/typescriptServices
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
...
...
@@ -13,6 +13,16 @@ import {TypeScriptWorkerProtocol, IRawModelData} from './typescript';
import
{
IModelContentChangedEvent2
}
from
'
vs/editor/common/editorCommon
'
;
import
{
MirrorModel2
}
from
'
vs/editor/common/model/mirrorModel2
'
;
const
DEFAULT_LIB
=
{
NAME
:
'
defaultLib:lib.d.ts
'
,
CONTENTS
:
libdts
};
const
ES6_LIB
=
{
NAME
:
'
defaultLib:lib.es6.d.ts
'
,
CONTENTS
:
libes6ts
};
class
TypeScriptWorker
extends
TypeScriptWorkerProtocol
implements
ts
.
LanguageServiceHost
{
// --- model sync -----------------------
...
...
@@ -78,9 +88,10 @@ class TypeScriptWorker extends TypeScriptWorkerProtocol implements ts.LanguageSe
// static extra lib
text
=
this
.
_extraLibs
[
fileName
];
}
else
if
(
this
.
isDefaultLibFileName
(
fileName
))
{
// load lib(.es6)?.d.ts as module
text
=
require
(
fileName
);
}
else
if
(
fileName
===
DEFAULT_LIB
.
NAME
)
{
text
=
DEFAULT_LIB
.
CONTENTS
;
}
else
if
(
fileName
===
ES6_LIB
.
NAME
)
{
text
=
ES6_LIB
.
CONTENTS
;
}
else
{
return
;
}
...
...
@@ -98,9 +109,7 @@ class TypeScriptWorker extends TypeScriptWorkerProtocol implements ts.LanguageSe
getDefaultLibFileName
(
options
:
ts
.
CompilerOptions
):
string
{
// TODO@joh support lib.es7.d.ts
return
options
.
target
>
ts
.
ScriptTarget
.
ES5
?
'
vs/text!vs/languages/typescript/common/lib/lib.es6.d.ts
'
:
'
vs/text!vs/languages/typescript/common/lib/lib.d.ts
'
;
return
options
.
target
>
ts
.
ScriptTarget
.
ES5
?
DEFAULT_LIB
.
NAME
:
ES6_LIB
.
NAME
;
}
isDefaultLibFileName
(
fileName
:
string
):
boolean
{
...
...
src/vs/text.js
已删除
100644 → 0
浏览文件 @
742f017f
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------------
*---------------------------------------------------------------------------------------------
*---------------------------------------------------------------------------------------------
*---------------------------------------------------------------------------------------------
*---------------------------------------------------------------------------------------------
* Please make sure to make edits in the .ts file at https://github.com/Microsoft/vscode-loader/
*---------------------------------------------------------------------------------------------
*---------------------------------------------------------------------------------------------
*---------------------------------------------------------------------------------------------
*---------------------------------------------------------------------------------------------
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
var
TextLoaderPlugin
;
(
function
(
TextLoaderPlugin
)
{
var
BrowserTextLoader
=
(
function
()
{
function
BrowserTextLoader
()
{
}
BrowserTextLoader
.
prototype
.
load
=
function
(
name
,
fileUrl
,
externalCallback
,
externalErrorback
)
{
var
req
=
new
XMLHttpRequest
();
req
.
onreadystatechange
=
function
()
{
if
(
req
.
readyState
===
4
)
{
if
((
req
.
status
>=
200
&&
req
.
status
<
300
)
||
req
.
status
===
1223
||
(
req
.
status
===
0
&&
req
.
responseText
&&
req
.
responseText
.
length
>
0
))
{
externalCallback
(
req
.
responseText
);
}
else
{
externalErrorback
(
req
);
}
req
.
onreadystatechange
=
null
;
}
};
req
.
open
(
'
GET
'
,
fileUrl
,
true
);
req
.
responseType
=
''
;
// Do not set X-Requested-With to allow for cross-domain requests
// req.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
req
.
send
(
null
);
};
return
BrowserTextLoader
;
}());
function
readFileAndRemoveBOM
(
fs
,
path
)
{
var
BOM_CHAR_CODE
=
65279
;
var
contents
=
fs
.
readFileSync
(
path
,
'
utf8
'
);
// Remove BOM
if
(
contents
.
charCodeAt
(
0
)
===
BOM_CHAR_CODE
)
{
contents
=
contents
.
substring
(
1
);
}
return
contents
;
}
var
NodeTextLoader
=
(
function
()
{
function
NodeTextLoader
()
{
this
.
fs
=
require
.
nodeRequire
(
'
fs
'
);
}
NodeTextLoader
.
prototype
.
load
=
function
(
name
,
fileUrl
,
callback
,
errorback
)
{
callback
(
readFileAndRemoveBOM
(
this
.
fs
,
fileUrl
));
};
return
NodeTextLoader
;
}());
// ------------------------------ Finally, the plugin
var
TextPlugin
=
(
function
()
{
function
TextPlugin
(
textLoader
)
{
this
.
textLoader
=
textLoader
;
}
TextPlugin
.
prototype
.
load
=
function
(
name
,
req
,
load
,
config
)
{
config
=
config
||
{};
var
myConfig
=
config
[
'
vs/text
'
]
||
{};
var
myPaths
=
myConfig
.
paths
||
{};
var
redirectedName
=
name
;
for
(
var
path
in
myPaths
)
{
if
(
myPaths
.
hasOwnProperty
(
path
))
{
if
(
name
.
indexOf
(
path
)
===
0
)
{
redirectedName
=
myPaths
[
path
]
+
name
.
substr
(
path
.
length
);
}
}
}
var
fileUrl
=
req
.
toUrl
(
redirectedName
);
this
.
textLoader
.
load
(
name
,
fileUrl
,
function
(
contents
)
{
if
(
config
.
isBuild
)
{
TextPlugin
.
BUILD_MAP
[
name
]
=
contents
;
}
load
(
contents
);
},
function
(
err
)
{
if
(
typeof
load
.
error
===
'
function
'
)
{
load
.
error
(
'
Could not find
'
+
fileUrl
);
}
});
};
TextPlugin
.
prototype
.
write
=
function
(
pluginName
,
moduleName
,
write
)
{
if
(
TextPlugin
.
BUILD_MAP
.
hasOwnProperty
(
moduleName
))
{
var
escapedText
=
Utilities
.
escapeText
(
TextPlugin
.
BUILD_MAP
[
moduleName
]);
write
(
'
define("
'
+
pluginName
+
'
!
'
+
moduleName
+
'
", function () { return "
'
+
escapedText
+
'
"; });
'
);
}
};
TextPlugin
.
BUILD_MAP
=
{};
return
TextPlugin
;
}());
TextLoaderPlugin
.
TextPlugin
=
TextPlugin
;
var
Utilities
=
(
function
()
{
function
Utilities
()
{
}
/**
* Escape text such that it can be used in a javascript string enclosed by double quotes (")
*/
Utilities
.
escapeText
=
function
(
text
)
{
// http://www.javascriptkit.com/jsref/escapesequence.shtml
// \b Backspace.
// \f Form feed.
// \n Newline.
// \O Nul character.
// \r Carriage return.
// \t Horizontal tab.
// \v Vertical tab.
// \' Single quote or apostrophe.
// \" Double quote.
// \\ Backslash.
// \ddd The Latin-1 character specified by the three octal digits between 0 and 377. ie, copyright symbol is \251.
// \xdd The Latin-1 character specified by the two hexadecimal digits dd between 00 and FF. ie, copyright symbol is \xA9.
// \udddd The Unicode character specified by the four hexadecimal digits dddd. ie, copyright symbol is \u00A9.
var
_backspace
=
'
\
b
'
.
charCodeAt
(
0
);
var
_formFeed
=
'
\
f
'
.
charCodeAt
(
0
);
var
_newLine
=
'
\n
'
.
charCodeAt
(
0
);
var
_nullChar
=
0
;
var
_carriageReturn
=
'
\r
'
.
charCodeAt
(
0
);
var
_tab
=
'
\t
'
.
charCodeAt
(
0
);
var
_verticalTab
=
'
\
v
'
.
charCodeAt
(
0
);
var
_backslash
=
'
\\
'
.
charCodeAt
(
0
);
var
_doubleQuote
=
'
"
'
.
charCodeAt
(
0
);
var
startPos
=
0
,
chrCode
,
replaceWith
=
null
,
resultPieces
=
[];
for
(
var
i
=
0
,
len
=
text
.
length
;
i
<
len
;
i
++
)
{
chrCode
=
text
.
charCodeAt
(
i
);
switch
(
chrCode
)
{
case
_backspace
:
replaceWith
=
'
\\
b
'
;
break
;
case
_formFeed
:
replaceWith
=
'
\\
f
'
;
break
;
case
_newLine
:
replaceWith
=
'
\\
n
'
;
break
;
case
_nullChar
:
replaceWith
=
'
\\
0
'
;
break
;
case
_carriageReturn
:
replaceWith
=
'
\\
r
'
;
break
;
case
_tab
:
replaceWith
=
'
\\
t
'
;
break
;
case
_verticalTab
:
replaceWith
=
'
\\
v
'
;
break
;
case
_backslash
:
replaceWith
=
'
\\\\
'
;
break
;
case
_doubleQuote
:
replaceWith
=
'
\\
"
'
;
break
;
}
if
(
replaceWith
!==
null
)
{
resultPieces
.
push
(
text
.
substring
(
startPos
,
i
));
resultPieces
.
push
(
replaceWith
);
startPos
=
i
+
1
;
replaceWith
=
null
;
}
}
resultPieces
.
push
(
text
.
substring
(
startPos
,
len
));
return
resultPieces
.
join
(
''
);
};
return
Utilities
;
}());
TextLoaderPlugin
.
Utilities
=
Utilities
;
(
function
()
{
var
textLoader
=
null
;
var
isElectron
=
(
typeof
process
!==
'
undefined
'
&&
typeof
process
.
versions
!==
'
undefined
'
&&
typeof
process
.
versions
[
'
electron
'
]
!==
'
undefined
'
);
if
(
typeof
process
!==
'
undefined
'
&&
process
.
versions
&&
!!
process
.
versions
.
node
&&
!
isElectron
)
{
textLoader
=
new
NodeTextLoader
();
}
else
{
textLoader
=
new
BrowserTextLoader
();
}
define
(
'
vs/text
'
,
new
TextPlugin
(
textLoader
));
})();
})(
TextLoaderPlugin
||
(
TextLoaderPlugin
=
{}));
src/vs/workbench/buildfile.js
浏览文件 @
545af1f1
...
...
@@ -6,7 +6,7 @@
function
createModuleDescription
(
name
,
exclude
)
{
var
result
=
{};
var
excludes
=
[
'
vs/css
'
,
'
vs/nls
'
,
'
vs/text
'
];
var
excludes
=
[
'
vs/css
'
,
'
vs/nls
'
];
result
.
name
=
name
;
if
(
Array
.
isArray
(
exclude
)
&&
exclude
.
length
>
0
)
{
excludes
=
excludes
.
concat
(
exclude
);
...
...
src/vs/workbench/parts/html/browser/webview.ts
浏览文件 @
545af1f1
...
...
@@ -5,7 +5,6 @@
'
use strict
'
;
import
'
vs/text!./webview.html
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录