提交 8bc37bcf 编写于 作者: A Alex Dima

Do not ship octicons in standalone editor

上级 30ce9667
......@@ -58,6 +58,8 @@ function editorLoaderConfig(removeAllOSS) {
// never ship marked in editor
result.paths['vs/base/common/marked/marked'] = 'out-build/vs/base/common/marked/marked.mock';
// never ship octicons in editor
result.paths['vs/base/browser/ui/octiconLabel/octiconLabel'] = 'out-build/vs/base/browser/ui/octiconLabel/octiconLabel.mock';
if (removeAllOSS) {
result.paths['vs/languages/lib/common/beautify-html'] = 'out-build/vs/languages/lib/common/beautify-html.mock';
......
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import octiconLabel = require('vs/base/browser/ui/octiconLabel/octiconLabel');
import {escape} from 'vs/base/common/strings';
function expand(text:string): string {
return text;
}
class MockOcticonLabel {
private _container: HTMLElement;
constructor(container: HTMLElement) {
this._container = container;
}
set text(text: string) {
let innerHTML = text || '';
innerHTML = escape(innerHTML);
innerHTML = expand(innerHTML);
this._container.innerHTML = innerHTML;
}
}
var mock: typeof octiconLabel = {
expand: expand,
OcticonLabel: <any>MockOcticonLabel
};
export = mock;
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册