浏览代码

Move fillers to `/build/` folder

Alexandru Dima 3 年之前
父节点
当前提交
1ffcd4ae93

+ 0 - 0
monaco-css/src/fillers/monaco-editor-core-amd.ts → build/fillers/monaco-editor-core-amd.ts


+ 0 - 0
monaco-css/src/fillers/vscode-nls.ts → build/fillers/vscode-nls.ts


+ 3 - 3
monaco-css/build.js

@@ -30,7 +30,7 @@ build({
 	outdir: 'release/esm/',
 	plugins: [
 		alias({
-			'vscode-nls': path.join(__dirname, 'src/fillers/vscode-nls.ts')
+			'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts')
 		})
 	]
 });
@@ -61,8 +61,8 @@ function buildOneAMD(type, entryPoint, banner) {
 		outdir: `release/${type}/`,
 		plugins: [
 			alias({
-				'vscode-nls': path.join(__dirname, 'src/fillers/vscode-nls.ts'),
-				'monaco-editor-core': path.join(__dirname, 'src/fillers/monaco-editor-core-amd.ts')
+				'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),
+				'monaco-editor-core': path.join(__dirname, '../build/fillers/monaco-editor-core-amd.ts')
 			})
 		]
 	};

+ 3 - 3
monaco-html/build.js

@@ -30,7 +30,7 @@ build({
 	outdir: 'release/esm/',
 	plugins: [
 		alias({
-			'vscode-nls': path.join(__dirname, 'src/fillers/vscode-nls.ts')
+			'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts')
 		})
 	]
 });
@@ -61,8 +61,8 @@ function buildOneAMD(type, entryPoint, banner) {
 		outdir: `release/${type}/`,
 		plugins: [
 			alias({
-				'vscode-nls': path.join(__dirname, 'src/fillers/vscode-nls.ts'),
-				'monaco-editor-core': path.join(__dirname, 'src/fillers/monaco-editor-core-amd.ts')
+				'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),
+				'monaco-editor-core': path.join(__dirname, '../build/fillers/monaco-editor-core-amd.ts')
 			})
 		]
 	};

+ 0 - 8
monaco-html/src/fillers/monaco-editor-core-amd.ts

@@ -1,8 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-
-// Resolves with the global monaco API
-
-export = (<any>self).monaco;

+ 0 - 46
monaco-html/src/fillers/vscode-nls.ts

@@ -1,46 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-
-export interface Options {
-	locale?: string;
-	cacheLanguageResolution?: boolean;
-}
-export interface LocalizeInfo {
-	key: string;
-	comment: string[];
-}
-export interface LocalizeFunc {
-	(info: LocalizeInfo, message: string, ...args: any[]): string;
-	(key: string, message: string, ...args: any[]): string;
-}
-export interface LoadFunc {
-	(file?: string): LocalizeFunc;
-}
-
-function format(message: string, args: any[]): string {
-	let result: string;
-
-	if (args.length === 0) {
-		result = message;
-	} else {
-		result = message.replace(/\{(\d+)\}/g, (match, rest) => {
-			let index = rest[0];
-			return typeof args[index] !== 'undefined' ? args[index] : match;
-		});
-	}
-	return result;
-}
-
-function localize(key: string | LocalizeInfo, message: string, ...args: any[]): string {
-	return format(message, args);
-}
-
-export function loadMessageBundle(file?: string): LocalizeFunc {
-	return localize;
-}
-
-export function config(opt?: Options | string): LoadFunc {
-	return loadMessageBundle;
-}