Skip to content
This repository was archived by the owner on Nov 5, 2021. It is now read-only.

Commit d2c6f44

Browse files
authored
Merge pull request #44 from olane/apex
Add Apex language
2 parents 178be30 + a3d8292 commit d2c6f44

File tree

7 files changed

+984
-1
lines changed

7 files changed

+984
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Colorization and configuration supports for multiple languages for the Monaco Ed
44

55
![monaco-languages](https://cloud.githubusercontent.com/assets/5047891/15938606/1fd4bac6-2e74-11e6-8839-d455da8bc8a7.gif)
66

7+
* apex
78
* azcli
89
* bat
910
* clojure

scripts/bundle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ bundleOne('shell/shell');
6969
bundleOne('perl/perl'),
7070
bundleOne('powerquery/powerquery')
7171
bundleOne('azcli/azcli')
72+
bundleOne('apex/apex');
7273

7374
function bundleOne(moduleId, exclude) {
7475
requirejs.optimize({

src/apex/apex.contribution.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
'use strict';
6+
7+
import { registerLanguage } from '../_.contribution';
8+
9+
// Allow for running under nodejs/requirejs in tests
10+
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
11+
12+
registerLanguage({
13+
id: 'apex',
14+
extensions: ['.cls'],
15+
aliases: ['Apex', 'apex'],
16+
mimetypes: ['text/x-apex-source', 'text/x-apex'],
17+
loader: () => _monaco.Promise.wrap(import('./apex'))
18+
});

0 commit comments

Comments
 (0)