mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Move basic languages sources to /src/
This commit is contained in:
parent
d5e3af3744
commit
0f7286cf55
247 changed files with 138 additions and 210 deletions
25
src/basic-languages/graphql/graphql.contribution.ts
Normal file
25
src/basic-languages/graphql/graphql.contribution.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { registerLanguage } from '../_.contribution';
|
||||
|
||||
declare var AMD: any;
|
||||
declare var require: any;
|
||||
|
||||
registerLanguage({
|
||||
id: 'graphql',
|
||||
extensions: ['.graphql', '.gql'],
|
||||
aliases: ['GraphQL', 'graphql', 'gql'],
|
||||
mimetypes: ['application/graphql'],
|
||||
loader: () => {
|
||||
if (AMD) {
|
||||
return new Promise((resolve, reject) => {
|
||||
require(['vs/basic-languages/graphql/graphql'], resolve, reject);
|
||||
});
|
||||
} else {
|
||||
return import('./graphql');
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue