1
0
Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master' into rcjsuen-patch-2

Alex Dima 7 жил өмнө
parent
commit
4c12640101
100 өөрчлөгдсөн 1807 нэмэгдсэн , 548 устгасан
  1. 0 1
      .gitignore
  2. 5 1
      .npmignore
  3. 1 1
      .travis.yml
  4. 7 14
      README.md
  5. 0 168
      gulpfile.js
  6. 923 0
      package-lock.json
  7. 10 15
      package.json
  8. 86 0
      scripts/bundle.js
  9. 46 0
      src/_.contribution.ts
  10. 17 0
      src/bat/bat.contribution.ts
  11. 1 1
      src/bat/bat.test.ts
  12. 7 1
      src/bat/bat.ts
  13. 18 0
      src/coffee/coffee.contribution.ts
  14. 1 1
      src/coffee/coffee.test.ts
  15. 7 1
      src/coffee/coffee.ts
  16. 23 0
      src/cpp/cpp.contribution.ts
  17. 9 1
      src/cpp/cpp.test.ts
  18. 22 1
      src/cpp/cpp.ts
  19. 17 0
      src/csharp/csharp.contribution.ts
  20. 1 1
      src/csharp/csharp.test.ts
  21. 7 1
      src/csharp/csharp.ts
  22. 17 0
      src/csp/csp.contribution.ts
  23. 1 1
      src/csp/csp.test.ts
  24. 0 0
      src/csp/csp.ts
  25. 18 0
      src/css/css.contribution.ts
  26. 1 1
      src/css/css.test.ts
  27. 8 1
      src/css/css.ts
  28. 18 0
      src/dockerfile/dockerfile.contribution.ts
  29. 1 1
      src/dockerfile/dockerfile.test.ts
  30. 0 0
      src/dockerfile/dockerfile.ts
  31. 17 0
      src/fsharp/fsharp.contribution.ts
  32. 4 2
      src/fsharp/fsharp.test.ts
  33. 8 2
      src/fsharp/fsharp.ts
  34. 17 0
      src/go/go.contribution.ts
  35. 1 1
      src/go/go.test.ts
  36. 0 0
      src/go/go.ts
  37. 18 0
      src/handlebars/handlebars.contribution.ts
  38. 1 1
      src/handlebars/handlebars.test.ts
  39. 0 0
      src/handlebars/handlebars.ts
  40. 18 0
      src/html/html.contribution.ts
  41. 1 1
      src/html/html.test.ts
  42. 7 0
      src/html/html.ts
  43. 18 0
      src/ini/ini.contribution.ts
  44. 0 0
      src/ini/ini.ts
  45. 18 0
      src/java/java.contribution.ts
  46. 1 1
      src/java/java.test.ts
  47. 7 1
      src/java/java.ts
  48. 18 0
      src/less/less.contribution.ts
  49. 1 1
      src/less/less.test.ts
  50. 7 1
      src/less/less.ts
  51. 17 0
      src/lua/lua.contribution.ts
  52. 1 1
      src/lua/lua.test.ts
  53. 0 0
      src/lua/lua.ts
  54. 17 0
      src/markdown/markdown.contribution.ts
  55. 1 1
      src/markdown/markdown.test.ts
  56. 7 1
      src/markdown/markdown.ts
  57. 0 0
      src/mocha.d.ts
  58. 38 303
      src/monaco.contribution.ts
  59. 17 0
      src/msdax/msdax.contribution.ts
  60. 1 1
      src/msdax/msdax.test.ts
  61. 0 0
      src/msdax/msdax.ts
  62. 17 0
      src/mysql/mysql.contribution.ts
  63. 1 1
      src/mysql/mysql.test.ts
  64. 0 0
      src/mysql/mysql.ts
  65. 17 0
      src/objective-c/objective-c.contribution.ts
  66. 1 1
      src/objective-c/objective-c.test.ts
  67. 0 0
      src/objective-c/objective-c.ts
  68. 17 0
      src/pgsql/pgsql.contribution.ts
  69. 1 1
      src/pgsql/pgsql.test.ts
  70. 0 0
      src/pgsql/pgsql.ts
  71. 18 0
      src/php/php.contribution.ts
  72. 1 1
      src/php/php.test.ts
  73. 8 1
      src/php/php.ts
  74. 17 0
      src/postiats/postiats.contribution.ts
  75. 1 1
      src/postiats/postiats.test.ts
  76. 0 0
      src/postiats/postiats.ts
  77. 17 0
      src/powershell/powershell.contribution.ts
  78. 1 1
      src/powershell/powershell.test.ts
  79. 7 1
      src/powershell/powershell.ts
  80. 17 0
      src/pug/pug.contribution.ts
  81. 1 1
      src/pug/pug.test.ts
  82. 4 1
      src/pug/pug.ts
  83. 18 0
      src/python/python.contribution.ts
  84. 1 1
      src/python/python.test.ts
  85. 8 1
      src/python/python.ts
  86. 17 0
      src/r/r.contribution.ts
  87. 1 1
      src/r/r.test.ts
  88. 0 0
      src/r/r.ts
  89. 18 0
      src/razor/razor.contribution.ts
  90. 1 1
      src/razor/razor.test.ts
  91. 0 0
      src/razor/razor.ts
  92. 17 0
      src/redis/redis.contribution.ts
  93. 1 1
      src/redis/redis.test.ts
  94. 0 0
      src/redis/redis.ts
  95. 17 0
      src/redshift/redshift.contribution.ts
  96. 1 1
      src/redshift/redshift.test.ts
  97. 0 0
      src/redshift/redshift.ts
  98. 18 0
      src/ruby/ruby.contribution.ts
  99. 9 1
      src/ruby/ruby.test.ts
  100. 1 1
      src/ruby/ruby.ts

+ 0 - 1
.gitignore

@@ -1,3 +1,2 @@
 /node_modules/
-/out/
 /release/

+ 5 - 1
.npmignore

@@ -1,6 +1,10 @@
 /.vscode/
-/out/
+/release/**/*.test.js
+/release/**/test/
+/scripts/
+/src/
 /test/
 /gulpfile.js
 /tsconfig.json
 /.npmignore
+/.travis.yml

+ 1 - 1
.travis.yml

@@ -1,6 +1,6 @@
 language: node_js
 node_js:
- - "5.10"
+ - "8.9.3"
 script:
  - npm run compile
  - npm run test

+ 7 - 14
README.md

@@ -52,25 +52,18 @@ This npm module is bundled and distributed in the [monaco-editor](https://www.np
 
 ## Dev: Adding a new language
 
-* create `$/src/myLang.ts`
-* create `$/test/myLang.test.ts`
+* create `$/src/myLang/myLang.contribution.ts`
+* create `$/src/myLang/myLang.ts`
+* create `$/src/myLang/myLang.test.ts`
 * restart compilation with `$> npm run watch`
 * edit `$/src/monaco.contribution.ts` and register your new language:
+* edit `$/test/setup.js` and load your new language while testing
 ```js
-  registerLanguage({
-  	id: 'sql',
-  	extensions: [ '.sql' ],
-  	aliases: [ 'SQL' ],
-  	module: './sql'
-  });
+  'release/dev/sql/sql.test',
 ```
-* edit `$/test/all.js` and load your new language while testing
+* edit `$/scripts/bundle.js` and ship your new language
 ```js
-  'out/test/sql.test',
-```
-* edit `$/gulpfile.js` and ship your new language
-```js
-  bundleOne('src/sql'),
+  bundleOne('sql/sql'),
 ```
 
 ## Code of Conduct

+ 0 - 168
gulpfile.js

@@ -1,168 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-
-var gulp = require('gulp');
-var tsb = require('gulp-tsb');
-var assign = require('object-assign');
-var fs = require('fs');
-var path = require('path');
-var merge = require('merge-stream');
-var rjs = require('gulp-requirejs');
-var uglify = require('gulp-uglify');
-var rimraf = require('rimraf');
-var es = require('event-stream');
-
-gulp.task('clean-release', function(cb) { rimraf('release', { maxBusyTries: 1 }, cb); });
-gulp.task('release', ['clean-release','compile'], function() {
-
-	var sha1 = getGitVersion(__dirname);
-	var semver = require('./package.json').version;
-	var headerVersion = semver + '(' + sha1 + ')';
-
-	var BUNDLED_FILE_HEADER = [
-		'/*!-----------------------------------------------------------------------------',
-		' * Copyright (c) Microsoft Corporation. All rights reserved.',
-		' * monaco-languages version: ' + headerVersion,
-		' * Released under the MIT license',
-		' * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md',
-		' *-----------------------------------------------------------------------------*/',
-		''
-	].join('\n');
-
-	function bundleOne(moduleId, exclude) {
-		return rjs({
-			baseUrl: '/out/',
-			name: 'vs/basic-languages/' + moduleId,
-			out: moduleId + '.js',
-			exclude: exclude,
-			paths: {
-				'vs/basic-languages': __dirname + '/out'
-			}
-		})
-	}
-
-	return merge(
-			bundleOne('src/monaco.contribution'),
-			bundleOne('src/bat'),
-			bundleOne('src/css'),
-			bundleOne('src/coffee'),
-			bundleOne('src/cpp'),
-			bundleOne('src/csharp'),
-			bundleOne('src/dockerfile'),
-			bundleOne('src/fsharp'),
-			bundleOne('src/go'),
-			bundleOne('src/handlebars'),
-			bundleOne('src/html'),
-			bundleOne('src/ini'),
-			bundleOne('src/pug'),
-			bundleOne('src/java'),
-			bundleOne('src/less'),
-			bundleOne('src/lua'),
-			bundleOne('src/markdown'),
-			bundleOne('src/msdax'),
-			bundleOne('src/objective-c'),
-			bundleOne('src/php'),
-			bundleOne('src/powershell'),
-			bundleOne('src/postiats'),
-			bundleOne('src/python'),
-			bundleOne('src/r'),
-			bundleOne('src/razor'),
-			bundleOne('src/ruby'),
-			bundleOne('src/scss'),
-			bundleOne('src/sql'),
-			bundleOne('src/swift'),
-			bundleOne('src/vb'),
-			bundleOne('src/xml'),
-			bundleOne('src/yaml'),
-			bundleOne('src/solidity'),
-			bundleOne('src/sb'),
-			bundleOne('src/mysql'),
-			bundleOne('src/redshift'),
-			bundleOne('src/pgsql'),
-			bundleOne('src/redis'),
-			bundleOne('src/csp')
-		)
-		.pipe(uglify({
-			output: {
-				comments: /^!/
-			}
-		}))
-		.pipe(es.through(function(data) {
-			data.contents = new Buffer(
-				BUNDLED_FILE_HEADER
-				+ data.contents.toString()
-			);
-			this.emit('data', data);
-		}))
-		.pipe(gulp.dest('./release/'));
-});
-
-
-var compilation = tsb.create(assign({ verbose: true }, require('./tsconfig.json').compilerOptions));
-
-var tsSources = require('./tsconfig.json').include.concat(require('./tsconfig.json').files);
-
-function compileTask() {
-	return merge(
-		gulp.src(tsSources, { base: '.' }).pipe(compilation())
-	)
-	.pipe(gulp.dest('out'));
-}
-gulp.task('clean-out', function(cb) { rimraf('out', { maxBusyTries: 1 }, cb); });
-gulp.task('compile', ['clean-out'], compileTask);
-gulp.task('compile-without-clean', compileTask);
-gulp.task('watch', ['compile'], function() {
-	gulp.watch(tsSources, ['compile-without-clean']);
-});
-
-function getGitVersion(repo) {
-	var git = path.join(repo, '.git');
-	var headPath = path.join(git, 'HEAD');
-	var head;
-
-	try {
-		head = fs.readFileSync(headPath, 'utf8').trim();
-	} catch (e) {
-		return void 0;
-	}
-
-	if (/^[0-9a-f]{40}$/i.test(head)) {
-		return head;
-	}
-
-	var refMatch = /^ref: (.*)$/.exec(head);
-
-	if (!refMatch) {
-		return void 0;
-	}
-
-	var ref = refMatch[1];
-	var refPath = path.join(git, ref);
-
-	try {
-		return fs.readFileSync(refPath, 'utf8').trim();
-	} catch (e) {
-		// noop
-	}
-
-	var packedRefsPath = path.join(git, 'packed-refs');
-	var refsRaw;
-
-	try {
-		refsRaw = fs.readFileSync(packedRefsPath, 'utf8').trim();
-	} catch (e) {
-		return void 0;
-	}
-
-	var refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm;
-	var refsMatch;
-	var refs = {};
-
-	while (refsMatch = refsRegex.exec(refsRaw)) {
-		refs[refsMatch[2]] = refsMatch[1];
-	}
-
-	return refs[ref];
-}

+ 923 - 0
package-lock.json

@@ -0,0 +1,923 @@
+{
+  "name": "monaco-languages",
+  "version": "1.0.3",
+  "lockfileVersion": 1,
+  "requires": true,
+  "dependencies": {
+    "ajv": {
+      "version": "5.5.2",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+      "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+      "dev": true,
+      "requires": {
+        "co": "4.6.0",
+        "fast-deep-equal": "1.1.0",
+        "fast-json-stable-stringify": "2.0.0",
+        "json-schema-traverse": "0.3.1"
+      }
+    },
+    "asn1": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
+      "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=",
+      "dev": true
+    },
+    "assert-plus": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+      "dev": true
+    },
+    "asynckit": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+      "dev": true
+    },
+    "aws-sign2": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+      "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
+      "dev": true
+    },
+    "aws4": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
+      "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=",
+      "dev": true
+    },
+    "balanced-match": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+      "dev": true
+    },
+    "bcrypt-pbkdf": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
+      "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "tweetnacl": "0.14.5"
+      }
+    },
+    "boom": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
+      "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
+      "dev": true,
+      "requires": {
+        "hoek": "4.2.1"
+      }
+    },
+    "brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "dev": true,
+      "requires": {
+        "balanced-match": "1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "browser-request": {
+      "version": "0.3.3",
+      "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz",
+      "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=",
+      "dev": true
+    },
+    "browser-stdout": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz",
+      "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=",
+      "dev": true
+    },
+    "caseless": {
+      "version": "0.12.0",
+      "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+      "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
+      "dev": true
+    },
+    "co": {
+      "version": "4.6.0",
+      "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+      "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
+      "dev": true
+    },
+    "combined-stream": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
+      "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
+      "dev": true,
+      "requires": {
+        "delayed-stream": "1.0.0"
+      }
+    },
+    "commander": {
+      "version": "2.9.0",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
+      "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
+      "dev": true,
+      "requires": {
+        "graceful-readlink": "1.0.1"
+      }
+    },
+    "concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+      "dev": true
+    },
+    "core-util-is": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+      "dev": true
+    },
+    "cryptiles": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz",
+      "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=",
+      "dev": true,
+      "requires": {
+        "boom": "5.2.0"
+      },
+      "dependencies": {
+        "boom": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz",
+          "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
+          "dev": true,
+          "requires": {
+            "hoek": "4.2.1"
+          }
+        }
+      }
+    },
+    "cssom": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz",
+      "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=",
+      "dev": true
+    },
+    "cssstyle": {
+      "version": "0.2.37",
+      "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz",
+      "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=",
+      "dev": true,
+      "requires": {
+        "cssom": "0.3.2"
+      }
+    },
+    "dashdash": {
+      "version": "1.14.1",
+      "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+      "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "1.0.0"
+      }
+    },
+    "debug": {
+      "version": "2.6.8",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
+      "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
+      "dev": true,
+      "requires": {
+        "ms": "2.0.0"
+      }
+    },
+    "delayed-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+      "dev": true
+    },
+    "diff": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz",
+      "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=",
+      "dev": true
+    },
+    "dom-serializer": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
+      "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
+      "dev": true,
+      "requires": {
+        "domelementtype": "1.1.3",
+        "entities": "1.1.1"
+      },
+      "dependencies": {
+        "domelementtype": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
+          "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
+          "dev": true
+        }
+      }
+    },
+    "domelementtype": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
+      "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=",
+      "dev": true
+    },
+    "domhandler": {
+      "version": "2.4.1",
+      "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz",
+      "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=",
+      "dev": true,
+      "requires": {
+        "domelementtype": "1.3.0"
+      }
+    },
+    "domutils": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
+      "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
+      "dev": true,
+      "requires": {
+        "dom-serializer": "0.1.0",
+        "domelementtype": "1.3.0"
+      }
+    },
+    "ecc-jsbn": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
+      "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "jsbn": "0.1.1"
+      }
+    },
+    "entities": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
+      "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=",
+      "dev": true
+    },
+    "escape-string-regexp": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+      "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+      "dev": true
+    },
+    "extend": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
+      "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
+      "dev": true
+    },
+    "extsprintf": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+      "dev": true
+    },
+    "fast-deep-equal": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
+      "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
+      "dev": true
+    },
+    "fast-json-stable-stringify": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
+      "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
+      "dev": true
+    },
+    "forever-agent": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+      "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+      "dev": true
+    },
+    "form-data": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
+      "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
+      "dev": true,
+      "requires": {
+        "asynckit": "0.4.0",
+        "combined-stream": "1.0.6",
+        "mime-types": "2.1.18"
+      }
+    },
+    "fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+      "dev": true
+    },
+    "getpass": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+      "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "1.0.0"
+      }
+    },
+    "glob": {
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz",
+      "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=",
+      "dev": true,
+      "requires": {
+        "fs.realpath": "1.0.0",
+        "inflight": "1.0.6",
+        "inherits": "2.0.3",
+        "minimatch": "3.0.4",
+        "once": "1.4.0",
+        "path-is-absolute": "1.0.1"
+      }
+    },
+    "graceful-readlink": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
+      "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
+      "dev": true
+    },
+    "growl": {
+      "version": "1.9.2",
+      "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz",
+      "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=",
+      "dev": true
+    },
+    "har-schema": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+      "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
+      "dev": true
+    },
+    "har-validator": {
+      "version": "5.0.3",
+      "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
+      "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
+      "dev": true,
+      "requires": {
+        "ajv": "5.5.2",
+        "har-schema": "2.0.0"
+      }
+    },
+    "has-flag": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
+      "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
+      "dev": true
+    },
+    "hawk": {
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz",
+      "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
+      "dev": true,
+      "requires": {
+        "boom": "4.3.1",
+        "cryptiles": "3.1.2",
+        "hoek": "4.2.1",
+        "sntp": "2.1.0"
+      }
+    },
+    "he": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
+      "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
+      "dev": true
+    },
+    "hoek": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
+      "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==",
+      "dev": true
+    },
+    "htmlparser2": {
+      "version": "3.9.2",
+      "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz",
+      "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=",
+      "dev": true,
+      "requires": {
+        "domelementtype": "1.3.0",
+        "domhandler": "2.4.1",
+        "domutils": "1.7.0",
+        "entities": "1.1.1",
+        "inherits": "2.0.3",
+        "readable-stream": "2.3.5"
+      }
+    },
+    "http-signature": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+      "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "1.0.0",
+        "jsprim": "1.4.1",
+        "sshpk": "1.13.1"
+      }
+    },
+    "inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+      "dev": true,
+      "requires": {
+        "once": "1.4.0",
+        "wrappy": "1.0.2"
+      }
+    },
+    "inherits": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+      "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+      "dev": true
+    },
+    "is-typedarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+      "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+      "dev": true
+    },
+    "isarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+      "dev": true
+    },
+    "isstream": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+      "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+      "dev": true
+    },
+    "jsbn": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+      "dev": true,
+      "optional": true
+    },
+    "jsdom-no-contextify": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/jsdom-no-contextify/-/jsdom-no-contextify-3.1.0.tgz",
+      "integrity": "sha1-DYvq9hDC/yOJT1Tfp/id0i/Q96s=",
+      "dev": true,
+      "requires": {
+        "browser-request": "0.3.3",
+        "cssom": "0.3.2",
+        "cssstyle": "0.2.37",
+        "htmlparser2": "3.9.2",
+        "nwmatcher": "1.4.3",
+        "parse5": "1.5.1",
+        "request": "2.85.0",
+        "xml-name-validator": "1.0.0",
+        "xmlhttprequest": "1.8.0"
+      }
+    },
+    "json-schema": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
+      "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
+      "dev": true
+    },
+    "json-schema-traverse": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
+      "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
+      "dev": true
+    },
+    "json-stringify-safe": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+      "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+      "dev": true
+    },
+    "json3": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz",
+      "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=",
+      "dev": true
+    },
+    "jsprim": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
+      "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "1.0.0",
+        "extsprintf": "1.3.0",
+        "json-schema": "0.2.3",
+        "verror": "1.10.0"
+      }
+    },
+    "lodash._baseassign": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
+      "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=",
+      "dev": true,
+      "requires": {
+        "lodash._basecopy": "3.0.1",
+        "lodash.keys": "3.1.2"
+      }
+    },
+    "lodash._basecopy": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
+      "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
+      "dev": true
+    },
+    "lodash._basecreate": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz",
+      "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=",
+      "dev": true
+    },
+    "lodash._getnative": {
+      "version": "3.9.1",
+      "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
+      "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
+      "dev": true
+    },
+    "lodash._isiterateecall": {
+      "version": "3.0.9",
+      "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
+      "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
+      "dev": true
+    },
+    "lodash.create": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz",
+      "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=",
+      "dev": true,
+      "requires": {
+        "lodash._baseassign": "3.2.0",
+        "lodash._basecreate": "3.0.3",
+        "lodash._isiterateecall": "3.0.9"
+      }
+    },
+    "lodash.isarguments": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
+      "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
+      "dev": true
+    },
+    "lodash.isarray": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
+      "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
+      "dev": true
+    },
+    "lodash.keys": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
+      "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
+      "dev": true,
+      "requires": {
+        "lodash._getnative": "3.9.1",
+        "lodash.isarguments": "3.1.0",
+        "lodash.isarray": "3.0.4"
+      }
+    },
+    "mime-db": {
+      "version": "1.33.0",
+      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
+      "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==",
+      "dev": true
+    },
+    "mime-types": {
+      "version": "2.1.18",
+      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz",
+      "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
+      "dev": true,
+      "requires": {
+        "mime-db": "1.33.0"
+      }
+    },
+    "minimatch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+      "dev": true,
+      "requires": {
+        "brace-expansion": "1.1.11"
+      }
+    },
+    "minimist": {
+      "version": "0.0.8",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+      "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+      "dev": true
+    },
+    "mkdirp": {
+      "version": "0.5.1",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+      "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+      "dev": true,
+      "requires": {
+        "minimist": "0.0.8"
+      }
+    },
+    "mocha": {
+      "version": "3.5.3",
+      "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz",
+      "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==",
+      "dev": true,
+      "requires": {
+        "browser-stdout": "1.3.0",
+        "commander": "2.9.0",
+        "debug": "2.6.8",
+        "diff": "3.2.0",
+        "escape-string-regexp": "1.0.5",
+        "glob": "7.1.1",
+        "growl": "1.9.2",
+        "he": "1.1.1",
+        "json3": "3.3.2",
+        "lodash.create": "3.1.1",
+        "mkdirp": "0.5.1",
+        "supports-color": "3.1.2"
+      }
+    },
+    "monaco-editor-core": {
+      "version": "0.11.1",
+      "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.11.1.tgz",
+      "integrity": "sha512-zbi+FI4Bm1B48AvAVjir0XUJlH85ZyFHaBcXvZjfy+mui8VaE7Run2ai/l9cvb6oqzTKQwg/UpYDu0BWyB8K5w==",
+      "dev": true
+    },
+    "monaco-plugin-helpers": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/monaco-plugin-helpers/-/monaco-plugin-helpers-1.0.2.tgz",
+      "integrity": "sha512-7kUx8dtd5qVNVgUARBRhnM8oftPglYwlINfigC4yGUiuzqtIN22u1tly8umiOCIPR0eFiBLjt6aN23oZh2QJgg==",
+      "dev": true,
+      "requires": {
+        "typescript": "2.7.2"
+      }
+    },
+    "ms": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+      "dev": true
+    },
+    "nwmatcher": {
+      "version": "1.4.3",
+      "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.3.tgz",
+      "integrity": "sha512-IKdSTiDWCarf2JTS5e9e2+5tPZGdkRJ79XjYV0pzK8Q9BpsFyBq1RGKxzs7Q8UBushGw7m6TzVKz6fcY99iSWw==",
+      "dev": true
+    },
+    "oauth-sign": {
+      "version": "0.8.2",
+      "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
+      "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
+      "dev": true
+    },
+    "once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+      "dev": true,
+      "requires": {
+        "wrappy": "1.0.2"
+      }
+    },
+    "parse5": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz",
+      "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=",
+      "dev": true
+    },
+    "path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+      "dev": true
+    },
+    "performance-now": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+      "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
+      "dev": true
+    },
+    "process-nextick-args": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+      "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
+      "dev": true
+    },
+    "punycode": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+      "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+      "dev": true
+    },
+    "qs": {
+      "version": "6.5.1",
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
+      "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==",
+      "dev": true
+    },
+    "readable-stream": {
+      "version": "2.3.5",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz",
+      "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==",
+      "dev": true,
+      "requires": {
+        "core-util-is": "1.0.2",
+        "inherits": "2.0.3",
+        "isarray": "1.0.0",
+        "process-nextick-args": "2.0.0",
+        "safe-buffer": "5.1.1",
+        "string_decoder": "1.0.3",
+        "util-deprecate": "1.0.2"
+      }
+    },
+    "request": {
+      "version": "2.85.0",
+      "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz",
+      "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==",
+      "dev": true,
+      "requires": {
+        "aws-sign2": "0.7.0",
+        "aws4": "1.6.0",
+        "caseless": "0.12.0",
+        "combined-stream": "1.0.6",
+        "extend": "3.0.1",
+        "forever-agent": "0.6.1",
+        "form-data": "2.3.2",
+        "har-validator": "5.0.3",
+        "hawk": "6.0.2",
+        "http-signature": "1.2.0",
+        "is-typedarray": "1.0.0",
+        "isstream": "0.1.2",
+        "json-stringify-safe": "5.0.1",
+        "mime-types": "2.1.18",
+        "oauth-sign": "0.8.2",
+        "performance-now": "2.1.0",
+        "qs": "6.5.1",
+        "safe-buffer": "5.1.1",
+        "stringstream": "0.0.5",
+        "tough-cookie": "2.3.4",
+        "tunnel-agent": "0.6.0",
+        "uuid": "3.2.1"
+      }
+    },
+    "requirejs": {
+      "version": "2.3.5",
+      "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.5.tgz",
+      "integrity": "sha512-svnO+aNcR/an9Dpi44C7KSAy5fFGLtmPbaaCeQaklUz8BQhS64tWWIIlvEA5jrWICzlO/X9KSzSeXFnZdBu8nw==",
+      "dev": true
+    },
+    "safe-buffer": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
+      "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
+      "dev": true
+    },
+    "sntp": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz",
+      "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
+      "dev": true,
+      "requires": {
+        "hoek": "4.2.1"
+      }
+    },
+    "source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "dev": true
+    },
+    "sshpk": {
+      "version": "1.13.1",
+      "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
+      "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
+      "dev": true,
+      "requires": {
+        "asn1": "0.2.3",
+        "assert-plus": "1.0.0",
+        "bcrypt-pbkdf": "1.0.1",
+        "dashdash": "1.14.1",
+        "ecc-jsbn": "0.1.1",
+        "getpass": "0.1.7",
+        "jsbn": "0.1.1",
+        "tweetnacl": "0.14.5"
+      }
+    },
+    "string_decoder": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
+      "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "5.1.1"
+      }
+    },
+    "stringstream": {
+      "version": "0.0.5",
+      "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
+      "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=",
+      "dev": true
+    },
+    "supports-color": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz",
+      "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=",
+      "dev": true,
+      "requires": {
+        "has-flag": "1.0.0"
+      }
+    },
+    "tough-cookie": {
+      "version": "2.3.4",
+      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
+      "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
+      "dev": true,
+      "requires": {
+        "punycode": "1.4.1"
+      }
+    },
+    "tunnel-agent": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+      "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "5.1.1"
+      }
+    },
+    "tweetnacl": {
+      "version": "0.14.5",
+      "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+      "dev": true,
+      "optional": true
+    },
+    "typescript": {
+      "version": "2.7.2",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz",
+      "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==",
+      "dev": true
+    },
+    "uglify-js": {
+      "version": "3.3.14",
+      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.14.tgz",
+      "integrity": "sha512-OY8VPQU25q09gQRbC+Ekk3xgEVBmYFEfVcgS47ksjTiNht2LmLlUkWutyi38ZsDSToJHwbe76kDGwmD226Z2Fg==",
+      "dev": true,
+      "requires": {
+        "commander": "2.14.1",
+        "source-map": "0.6.1"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.14.1",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz",
+          "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==",
+          "dev": true
+        }
+      }
+    },
+    "util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+      "dev": true
+    },
+    "uuid": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
+      "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
+      "dev": true
+    },
+    "verror": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+      "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "1.0.0",
+        "core-util-is": "1.0.2",
+        "extsprintf": "1.3.0"
+      }
+    },
+    "wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+      "dev": true
+    },
+    "xml-name-validator": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-1.0.0.tgz",
+      "integrity": "sha1-3Pgu4JIyKVHvjMG6WWycv9FKg/E=",
+      "dev": true
+    },
+    "xmlhttprequest": {
+      "version": "1.8.0",
+      "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
+      "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=",
+      "dev": true
+    }
+  }
+}

+ 10 - 15
package.json

@@ -1,12 +1,12 @@
 {
   "name": "monaco-languages",
-  "version": "0.9.0",
+  "version": "1.0.3",
   "description": "Bundle of many languages for the Monaco Editor.",
   "scripts": {
-    "compile": "node_modules/.bin/gulp compile",
-    "watch": "node_modules/.bin/gulp watch",
-    "test": "node_modules/.bin/mocha",
-    "prepublish": "node_modules/.bin/gulp release"
+    "compile": "mrmdir ./release && tsc -p ./src/tsconfig.json && tsc -p ./src/tsconfig.esm.json",
+    "watch": "tsc -p ./src --watch",
+    "test": "mocha",
+    "prepublish": "npm run compile && node ./scripts/bundle"
   },
   "author": "Microsoft Corporation",
   "license": "MIT",
@@ -18,17 +18,12 @@
     "url": "https://github.com/Microsoft/monaco-languages/issues"
   },
   "devDependencies": {
-    "event-stream": "^3.3.4",
-    "gulp": "^3.9.1",
-    "gulp-requirejs": "^1.0.0-rc2",
-    "gulp-tsb": "^2.0.3",
-    "gulp-uglify": "^3.0.0",
     "jsdom-no-contextify": "^3.1.0",
-    "merge-stream": "^1.0.1",
     "mocha": "^3.4.2",
-    "monaco-editor-core": "^0.10.0",
-    "object-assign": "^4.1.1",
-    "rimraf": "^2.6.1",
-    "typescript": "2.3.4"
+    "monaco-editor-core": "0.11.1",
+    "monaco-plugin-helpers": "^1.0.2",
+    "requirejs": "^2.3.5",
+    "typescript": "2.7.2",
+    "uglify-js": "^3.3.14"
   }
 }

+ 86 - 0
scripts/bundle.js

@@ -0,0 +1,86 @@
+const requirejs = require('requirejs');
+const path = require('path');
+const fs = require('fs');
+const UglifyJS = require("uglify-js");
+const helpers = require('monaco-plugin-helpers');
+
+const REPO_ROOT = path.resolve(__dirname, '..');
+
+const sha1 = helpers.getGitVersion(REPO_ROOT);
+const semver = require('../package.json').version;
+const headerVersion = semver + '(' + sha1 + ')';
+
+const BUNDLED_FILE_HEADER = [
+	'/*!-----------------------------------------------------------------------------',
+	' * Copyright (c) Microsoft Corporation. All rights reserved.',
+	' * monaco-languages version: ' + headerVersion,
+	' * Released under the MIT license',
+	' * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md',
+	' *-----------------------------------------------------------------------------*/',
+	''
+].join('\n');
+
+bundleOne('monaco.contribution');
+bundleOne('bat/bat');
+bundleOne('css/css');
+bundleOne('coffee/coffee');
+bundleOne('cpp/cpp');
+bundleOne('csharp/csharp');
+bundleOne('dockerfile/dockerfile');
+bundleOne('fsharp/fsharp');
+bundleOne('go/go');
+bundleOne('handlebars/handlebars');
+bundleOne('html/html');
+bundleOne('ini/ini');
+bundleOne('pug/pug');
+bundleOne('java/java');
+bundleOne('less/less');
+bundleOne('lua/lua');
+bundleOne('markdown/markdown');
+bundleOne('msdax/msdax');
+bundleOne('objective-c/objective-c');
+bundleOne('php/php');
+bundleOne('powershell/powershell');
+bundleOne('postiats/postiats');
+bundleOne('python/python');
+bundleOne('r/r');
+bundleOne('razor/razor');
+bundleOne('ruby/ruby');
+bundleOne('scss/scss');
+bundleOne('sql/sql');
+bundleOne('swift/swift');
+bundleOne('vb/vb');
+bundleOne('xml/xml');
+bundleOne('yaml/yaml');
+bundleOne('solidity/solidity');
+bundleOne('sb/sb');
+bundleOne('mysql/mysql');
+bundleOne('redshift/redshift');
+bundleOne('pgsql/pgsql');
+bundleOne('redis/redis');
+bundleOne('csp/csp');
+
+function bundleOne(moduleId, exclude) {
+	requirejs.optimize({
+		baseUrl: 'release/dev/',
+		name: 'vs/basic-languages/' + moduleId,
+		out: 'release/min/' + moduleId + '.js',
+		exclude: exclude,
+		paths: {
+			'vs/basic-languages': REPO_ROOT + '/release/dev'
+		},
+		optimize: 'none'
+	}, function(buildResponse) {
+		const filePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js');
+		const fileContents = fs.readFileSync(filePath).toString();
+		console.log();
+		console.log(`Minifying ${filePath}...`);
+		const result = UglifyJS.minify(fileContents, {
+			output: {
+				comments: 'some'
+			}
+		});
+		console.log(`Done.`);
+		fs.writeFileSync(filePath, BUNDLED_FILE_HEADER + result.code);
+	})
+}

+ 46 - 0
src/_.contribution.ts

@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+interface ILang extends monaco.languages.ILanguageExtensionPoint {
+	loader: () => monaco.Promise<ILangImpl>;
+}
+
+interface ILangImpl {
+	conf: monaco.languages.LanguageConfiguration;
+	language: monaco.languages.IMonarchLanguage;
+}
+
+let languageDefinitions: { [languageId: string]: ILang } = {};
+
+function _loadLanguage(languageId: string): monaco.Promise<void> {
+	const loader = languageDefinitions[languageId].loader;
+	return loader().then((mod) => {
+		_monaco.languages.setMonarchTokensProvider(languageId, mod.language);
+		_monaco.languages.setLanguageConfiguration(languageId, mod.conf);
+	});
+}
+
+let languagePromises: { [languageId: string]: monaco.Promise<void> } = {};
+
+export function loadLanguage(languageId: string): monaco.Promise<void> {
+	if (!languagePromises[languageId]) {
+		languagePromises[languageId] = _loadLanguage(languageId);
+	}
+	return languagePromises[languageId];
+}
+
+export function registerLanguage(def: ILang): void {
+	let languageId = def.id;
+
+	languageDefinitions[languageId] = def;
+	_monaco.languages.register(def);
+	_monaco.languages.onLanguage(languageId, () => {
+		loadLanguage(languageId);
+	});
+}

+ 17 - 0
src/bat/bat.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'bat',
+	extensions: ['.bat', '.cmd'],
+	aliases: ['Batch', 'bat'],
+	loader: () => _monaco.Promise.wrap(import('./bat'))
+});

+ 1 - 1
test/bat.test.ts → src/bat/bat.test.ts

@@ -4,7 +4,7 @@
  *--------------------------------------------------------------------------------------------*/
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('bat', [
 	// Keywords

+ 7 - 1
src/bat.ts → src/bat/bat.ts

@@ -27,7 +27,13 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '[', close: ']' },
 		{ open: '(', close: ')' },
 		{ open: '"', close: '"' },
-	]
+	],
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*(::\\s*|REM\\s+)#region"),
+			end: new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 18 - 0
src/coffee/coffee.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'coffeescript',
+	extensions: ['.coffee'],
+	aliases: ['CoffeeScript', 'coffeescript', 'coffee'],
+	mimetypes: ['text/x-coffeescript', 'text/coffeescript'],
+	loader: () => _monaco.Promise.wrap(import('./coffee'))
+});

+ 1 - 1
test/coffee.test.ts → src/coffee/coffee.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('coffeescript', [
 	// Comments

+ 7 - 1
src/coffee.ts → src/coffee/coffee.ts

@@ -32,7 +32,13 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '(', close: ')' },
 		{ open: '"', close: '"' },
 		{ open: '\'', close: '\'' },
-	]
+	],
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*#region\\b"),
+			end: new RegExp("^\\s*#endregion\\b")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 23 - 0
src/cpp/cpp.contribution.ts

@@ -0,0 +1,23 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'c',
+	extensions: ['.c', '.h'],
+	aliases: ['C', 'c'],
+	loader: () => _monaco.Promise.wrap(import('./cpp'))
+});
+registerLanguage({
+	id: 'cpp',
+	extensions: ['.cpp', '.cc', '.cxx', '.hpp', '.hh', '.hxx'],
+	aliases: ['C++', 'Cpp', 'cpp'],
+	loader: () => _monaco.Promise.wrap(import('./cpp'))
+});

+ 9 - 1
test/cpp.test.ts → src/cpp/cpp.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('cpp', [
 	// Keywords
@@ -776,5 +776,13 @@ testTokenization('cpp', [
 			{ startIndex: 25, type: 'identifier.cpp' },
 			{ startIndex: 26, type: 'delimiter.parenthesis.cpp' }
 		]
+	}, {
+		line: 'uR"V0G0N(abc)V0G0N"def',
+		tokens: [
+			{ startIndex: 0, type: 'string.raw.begin.cpp' },
+			{ startIndex: 9, type: 'string.raw.cpp' },
+			{ startIndex: 12, type: 'string.raw.end.cpp' },
+			{ startIndex: 19, type: 'identifier.cpp' }
+		]
 	}]
 ]);

+ 22 - 1
src/cpp.ts → src/cpp/cpp.ts

@@ -31,7 +31,13 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '(', close: ')' },
 		{ open: '"', close: '"' },
 		{ open: '\'', close: '\'' },
-	]
+	],
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*#pragma\\s+region\\b"),
+			end: new RegExp("^\\s*#pragma\\s+endregion\\b")
+		}
+	}
 };
 
 export const language = <ILanguage>{
@@ -240,10 +246,14 @@ export const language = <ILanguage>{
 	escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
 	integersuffix: /(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,
 	floatsuffix: /[fFlL]?/,
+	encoding: /u|u8|U|L/,
 
 	// The main tokenizer for our languages
 	tokenizer: {
 		root: [
+			// C++ 11 Raw String
+			[/@encoding?R\"(?:([^ ()\\\t]*))\(/, { token: 'string.raw.begin', next: '@raw.$1' }],
+
 			// identifiers and keywords
 			[/[a-zA-Z_]\w*/, {
 				cases: {
@@ -318,5 +328,16 @@ export const language = <ILanguage>{
 			[/\\./, 'string.escape.invalid'],
 			[/"/, 'string', '@pop']
 		],
+
+		raw: [
+			[/(.*)(\))(?:([^ ()\\\t]*))(\")/, {
+					cases: {
+						'$3==$S2': ['string.raw', 'string.raw.end', 'string.raw.end', { token: 'string.raw.end', next: '@pop' }],
+						'@default': ['string.raw', 'string.raw', 'string.raw', 'string.raw']
+					}
+				}
+			],
+			[/.*/, 'string.raw']
+		]
 	},
 };

+ 17 - 0
src/csharp/csharp.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'csharp',
+	extensions: ['.cs', '.csx'],
+	aliases: ['C#', 'csharp'],
+	loader: () => _monaco.Promise.wrap(import('./csharp'))
+});

+ 1 - 1
test/csharp.test.ts → src/csharp/csharp.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('csharp', [
 

+ 7 - 1
src/csharp.ts → src/csharp/csharp.ts

@@ -33,7 +33,13 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '<', close: '>' },
 		{ open: '\'', close: '\'' },
 		{ open: '"', close: '"' },
-	]
+	],
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*#region\\b"),
+			end: new RegExp("^\\s*#endregion\\b")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 17 - 0
src/csp/csp.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'csp',
+	extensions: [],
+	aliases: ['CSP', 'csp'],
+	loader: () => _monaco.Promise.wrap(import('./csp'))
+});

+ 1 - 1
test/csp.test.ts → src/csp/csp.test.ts

@@ -5,6 +5,6 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('csp', []);

+ 0 - 0
src/csp.ts → src/csp/csp.ts


+ 18 - 0
src/css/css.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'css',
+	extensions: ['.css'],
+	aliases: ['CSS', 'css'],
+	mimetypes: ['text/css'],
+	loader: () => _monaco.Promise.wrap(import('./css'))
+});

+ 1 - 1
test/css.test.ts → src/css/css.test.ts

@@ -4,7 +4,7 @@
  *--------------------------------------------------------------------------------------------*/
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('css', [
 	// Skip whitespace

+ 8 - 1
src/css.ts → src/css/css.ts

@@ -35,7 +35,14 @@ export const conf: LanguageConfiguration = {
 		{ open: '(', close: ')' },
 		{ open: '"', close: '"' },
 		{ open: '\'', close: '\'' }
-	]
+	],
+
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
+			end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
+		}
+	}
 };
 
 export const language = <IMonarchLanguage>{

+ 18 - 0
src/dockerfile/dockerfile.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'dockerfile',
+	extensions: ['.dockerfile'],
+	filenames: ['Dockerfile'],
+	aliases: ['Dockerfile'],
+	loader: () => _monaco.Promise.wrap(import('./dockerfile'))
+});

+ 1 - 1
test/dockerfile.test.ts → src/dockerfile/dockerfile.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('dockerfile', [
 	// All

+ 0 - 0
src/dockerfile.ts → src/dockerfile/dockerfile.ts


+ 17 - 0
src/fsharp/fsharp.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'fsharp',
+	extensions: ['.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript'],
+	aliases: ['F#', 'FSharp', 'fsharp'],
+	loader: () => _monaco.Promise.wrap(import('./fsharp'))
+});

+ 4 - 2
test/fsharp.test.ts → src/fsharp/fsharp.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('fsharp', [
 	// comments - single line
@@ -184,7 +184,9 @@ testTokenization('fsharp', [
 			{ startIndex: 1, type: '' },
 			{ startIndex: 2, type: 'delimiter.fs' },
 			{ startIndex: 3, type: '' },
-			{ startIndex: 4, type: 'comment.fs' }
+			{ startIndex: 4, type: 'delimiter.parenthesis.fs' },
+			{ startIndex: 5, type: 'delimiter.fs' },
+			{ startIndex: 6, type: 'delimiter.parenthesis.fs' }
 		]
 	}],
 

+ 8 - 2
src/fsharp.ts → src/fsharp/fsharp.ts

@@ -30,7 +30,13 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '(', close: ')' },
 		{ open: '"', close: '"' },
 		{ open: '\'', close: '\'' }
-	]
+	],
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),
+			end: new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")
+		}
+	}
 };
 
 export const language = <ILanguage>{
@@ -121,7 +127,7 @@ export const language = <ILanguage>{
 
 		whitespace: [
 			[/[ \t\r\n]+/, ''],
-			[/\(\*/, 'comment', '@comment'],
+			[/\(\*(?!\))/, 'comment', '@comment'],
 			[/\/\/.*$/, 'comment'],
 		],
 

+ 17 - 0
src/go/go.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'go',
+	extensions: ['.go'],
+	aliases: ['Go'],
+	loader: () => _monaco.Promise.wrap(import('./go'))
+});

+ 1 - 1
test/go.test.ts → src/go/go.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('go', [
 	// Tests

+ 0 - 0
src/go.ts → src/go/go.ts


+ 18 - 0
src/handlebars/handlebars.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'handlebars',
+	extensions: ['.handlebars', '.hbs'],
+	aliases: ['Handlebars', 'handlebars'],
+	mimetypes: ['text/x-handlebars-template'],
+	loader: () => _monaco.Promise.wrap(import('./handlebars'))
+});

+ 1 - 1
test/handlebars.test.ts → src/handlebars/handlebars.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization(['handlebars', 'css'], [
 

+ 0 - 0
src/handlebars.ts → src/handlebars/handlebars.ts


+ 18 - 0
src/html/html.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'html',
+	extensions: ['.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm'],
+	aliases: ['HTML', 'htm', 'html', 'xhtml'],
+	mimetypes: ['text/html', 'text/x-jshtm', 'text/template', 'text/ng-template'],
+	loader: () => _monaco.Promise.wrap(import('./html'))
+});

+ 1 - 1
test/html.test.ts → src/html/html.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization(['html', 'css'], [
 

+ 7 - 0
src/html.ts → src/html/html.ts

@@ -55,6 +55,13 @@ export const conf: IRichLanguageConfiguration = {
 			action: { indentAction: _monaco.languages.IndentAction.Indent }
 		}
 	],
+
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*<!--\\s*#region\\b.*-->"),
+			end: new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 18 - 0
src/ini/ini.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'ini',
+	extensions: ['.ini', '.properties', '.gitconfig'],
+	filenames: ['config', '.gitattributes', '.gitconfig', '.editorconfig'],
+	aliases: ['Ini', 'ini'],
+	loader: () => _monaco.Promise.wrap(import('./ini'))
+});

+ 0 - 0
src/ini.ts → src/ini/ini.ts


+ 18 - 0
src/java/java.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'java',
+	extensions: ['.java', '.jav'],
+	aliases: ['Java', 'java'],
+	mimetypes: ['text/x-java-source', 'text/x-java'],
+	loader: () => _monaco.Promise.wrap(import('./java'))
+});

+ 1 - 1
test/java.test.ts → src/java/java.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('java', [
 	// Comments - single line

+ 7 - 1
src/java.ts → src/java/java.ts

@@ -34,7 +34,13 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '"', close: '"' },
 		{ open: '\'', close: '\'' },
 		{ open: '<', close: '>' },
-	]
+	],
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
+			end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 18 - 0
src/less/less.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'less',
+	extensions: ['.less'],
+	aliases: ['Less', 'less'],
+	mimetypes: ['text/x-less', 'text/less'],
+	loader: () => _monaco.Promise.wrap(import('./less'))
+});

+ 1 - 1
test/less.test.ts → src/less/less.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization(['less'], [
 

+ 7 - 1
src/less.ts → src/less/less.ts

@@ -32,7 +32,13 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '(', close: ')' },
 		{ open: '"', close: '"' },
 		{ open: '\'', close: '\'' },
-	]
+	],
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
+			end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 17 - 0
src/lua/lua.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'lua',
+	extensions: ['.lua'],
+	aliases: ['Lua', 'lua'],
+	loader: () => _monaco.Promise.wrap(import('./lua'))
+});

+ 1 - 1
test/lua.test.ts → src/lua/lua.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('lua', [
 

+ 0 - 0
src/lua.ts → src/lua/lua.ts


+ 17 - 0
src/markdown/markdown.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'markdown',
+	extensions: ['.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext'],
+	aliases: ['Markdown', 'markdown'],
+	loader: () => _monaco.Promise.wrap(import('./markdown'))
+});

+ 1 - 1
test/markdown.test.ts → src/markdown/markdown.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('markdown', [
 

+ 7 - 1
src/markdown.ts → src/markdown/markdown.ts

@@ -44,7 +44,13 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '(', close: ')' },
 		{ open: '[', close: ']' },
 		{ open: '`', close: '`' },
-	]
+	],
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
+			end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 0 - 0
test/mocha.d.ts → src/mocha.d.ts


+ 38 - 303
src/monaco.contribution.ts

@@ -4,306 +4,41 @@
  *--------------------------------------------------------------------------------------------*/
 'use strict';
 
-declare var require: <T>(moduleId: [string], callback: (module: T) => void, error: (err: any) => void) => void;
-
-// Allow for running under nodejs/requirejs in tests
-const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
-
-interface ILang extends monaco.languages.ILanguageExtensionPoint {
-	module: string;
-}
-
-interface ILangImpl {
-	conf: monaco.languages.LanguageConfiguration;
-	language: monaco.languages.IMonarchLanguage;
-}
-
-let languageDefinitions: { [languageId: string]: ILang } = {};
-
-function _loadLanguage(languageId: string): monaco.Promise<void> {
-	let module = languageDefinitions[languageId].module;
-	return new _monaco.Promise<void>((c, e, p) => {
-		require<ILangImpl>([module], (mod) => {
-			_monaco.languages.setMonarchTokensProvider(languageId, mod.language);
-			_monaco.languages.setLanguageConfiguration(languageId, mod.conf);
-			c(void 0);
-		}, e);
-	});
-}
-
-let languagePromises: { [languageId: string]: monaco.Promise<void> } = {};
-
-export function loadLanguage(languageId: string): monaco.Promise<void> {
-	if (!languagePromises[languageId]) {
-		languagePromises[languageId] = _loadLanguage(languageId);
-	}
-	return languagePromises[languageId];
-}
-
-function registerLanguage(def: ILang): void {
-	let languageId = def.id;
-
-	languageDefinitions[languageId] = def;
-	_monaco.languages.register(def);
-	_monaco.languages.onLanguage(languageId, () => {
-		loadLanguage(languageId);
-	});
-}
-
-
-registerLanguage({
-	id: 'bat',
-	extensions: ['.bat', '.cmd'],
-	aliases: ['Batch', 'bat'],
-	module: './bat'
-});
-registerLanguage({
-	id: 'coffeescript',
-	extensions: ['.coffee'],
-	aliases: ['CoffeeScript', 'coffeescript', 'coffee'],
-	mimetypes: ['text/x-coffeescript', 'text/coffeescript'],
-	module: './coffee'
-});
-registerLanguage({
-	id: 'c',
-	extensions: ['.c', '.h'],
-	aliases: ['C', 'c'],
-	module: './cpp'
-});
-registerLanguage({
-	id: 'cpp',
-	extensions: ['.cpp', '.cc', '.cxx', '.hpp', '.hh', '.hxx'],
-	aliases: ['C++', 'Cpp', 'cpp'],
-	module: './cpp'
-});
-registerLanguage({
-	id: 'csharp',
-	extensions: ['.cs', '.csx'],
-	aliases: ['C#', 'csharp'],
-	module: './csharp'
-});
-registerLanguage({
-	id: 'dockerfile',
-	extensions: ['.dockerfile'],
-	filenames: ['Dockerfile'],
-	aliases: ['Dockerfile'],
-	module: './dockerfile'
-});
-registerLanguage({
-	id: 'fsharp',
-	extensions: ['.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript'],
-	aliases: ['F#', 'FSharp', 'fsharp'],
-	module: './fsharp'
-});
-registerLanguage({
-	id: 'go',
-	extensions: ['.go'],
-	aliases: ['Go'],
-	module: './go'
-});
-registerLanguage({
-	id: 'handlebars',
-	extensions: ['.handlebars', '.hbs'],
-	aliases: ['Handlebars', 'handlebars'],
-	mimetypes: ['text/x-handlebars-template'],
-	module: './handlebars'
-});
-registerLanguage({
-	id: 'html',
-	extensions: ['.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm'],
-	aliases: ['HTML', 'htm', 'html', 'xhtml'],
-	mimetypes: ['text/html', 'text/x-jshtm', 'text/template', 'text/ng-template'],
-	module: './html'
-});
-registerLanguage({
-	id: 'ini',
-	extensions: ['.ini', '.properties', '.gitconfig'],
-	filenames: ['config', '.gitattributes', '.gitconfig', '.editorconfig'],
-	aliases: ['Ini', 'ini'],
-	module: './ini'
-});
-registerLanguage({
-	id: 'pug',
-	extensions: ['.jade', '.pug'],
-	aliases: ['Pug', 'Jade', 'jade'],
-	module: './pug'
-});
-registerLanguage({
-	id: 'java',
-	extensions: ['.java', '.jav'],
-	aliases: ['Java', 'java'],
-	mimetypes: ['text/x-java-source', 'text/x-java'],
-	module: './java'
-});
-registerLanguage({
-	id: 'lua',
-	extensions: ['.lua'],
-	aliases: ['Lua', 'lua'],
-	module: './lua'
-});
-registerLanguage({
-	id: 'markdown',
-	extensions: ['.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext'],
-	aliases: ['Markdown', 'markdown'],
-	module: './markdown'
-});
-registerLanguage({
-	id: 'msdax',
-	extensions: ['.dax', '.msdax'],
-	aliases: ['DAX', 'MSDAX'],
-	module: './msdax'
-});
-registerLanguage({
-	id: 'objective-c',
-	extensions: ['.m'],
-	aliases: ['Objective-C'],
-	module: './objective-c'
-});
-registerLanguage({
-	id: 'postiats',
-	extensions: ['.dats', '.sats', '.hats'],
-	aliases: ['ATS', 'ATS/Postiats'],
-	module: './postiats'
-});
-registerLanguage({
-	id: 'php',
-	extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'],
-	aliases: ['PHP', 'php'],
-	mimetypes: ['application/x-php'],
-	module: './php'
-});
-registerLanguage({
-	id: 'powershell',
-	extensions: ['.ps1', '.psm1', '.psd1'],
-	aliases: ['PowerShell', 'powershell', 'ps', 'ps1'],
-	module: './powershell'
-});
-registerLanguage({
-	id: 'python',
-	extensions: ['.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi'],
-	aliases: ['Python', 'py'],
-	firstLine: '^#!/.*\\bpython[0-9.-]*\\b',
-	module: './python'
-});
-registerLanguage({
-	id: 'r',
-	extensions: ['.r', '.rhistory', '.rprofile', '.rt'],
-	aliases: ['R', 'r'],
-	module: './r'
-});
-registerLanguage({
-	id: 'razor',
-	extensions: ['.cshtml'],
-	aliases: ['Razor', 'razor'],
-	mimetypes: ['text/x-cshtml'],
-	module: './razor'
-});
-registerLanguage({
-	id: 'ruby',
-	extensions: ['.rb', '.rbx', '.rjs', '.gemspec', '.pp'],
-	filenames: ['rakefile'],
-	aliases: ['Ruby', 'rb'],
-	module: './ruby'
-});
-registerLanguage({
-	id: 'swift',
-	aliases: ['Swift', 'swift'],
-	extensions: ['.swift'],
-	mimetypes: ['text/swift'],
-	module: './swift'
-});
-registerLanguage({
-	id: 'sql',
-	extensions: ['.sql'],
-	aliases: ['SQL'],
-	module: './sql'
-});
-registerLanguage({
-	id: 'vb',
-	extensions: ['.vb'],
-	aliases: ['Visual Basic', 'vb'],
-	module: './vb'
-});
-registerLanguage({
-	id: 'xml',
-	extensions: ['.xml', '.dtd', '.ascx', '.csproj', '.config', '.wxi', '.wxl', '.wxs', '.xaml', '.svg', '.svgz'],
-	firstLine: '(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)',
-	aliases: ['XML', 'xml'],
-	mimetypes: ['text/xml', 'application/xml', 'application/xaml+xml', 'application/xml-dtd'],
-	module: './xml'
-});
-registerLanguage({
-	id: 'less',
-	extensions: ['.less'],
-	aliases: ['Less', 'less'],
-	mimetypes: ['text/x-less', 'text/less'],
-	module: './less'
-});
-registerLanguage({
-	id: 'scss',
-	extensions: ['.scss'],
-	aliases: ['Sass', 'sass', 'scss'],
-	mimetypes: ['text/x-scss', 'text/scss'],
-	module: './scss'
-});
-registerLanguage({
-	id: 'css',
-	extensions: ['.css'],
-	aliases: ['CSS', 'css'],
-	mimetypes: ['text/css'],
-	module: './css'
-});
-registerLanguage({
-	id: 'yaml',
-	extensions: ['.yaml', '.yml'],
-	aliases: ['YAML', 'yaml', 'YML', 'yml'],
-	mimetypes: ['application/x-yaml'],
-	module: './yaml'
-});
-registerLanguage({
-	id: 'sol',
-	extensions: ['.sol'],
-	aliases: ['sol', 'solidity', 'Solidity'],
-	module: './solidity'
-});
-registerLanguage({
-	id: 'sb',
-	extensions: ['.sb'],
-	aliases: ['Small Basic', 'sb'],
-	module: './sb'
-});
-
-registerLanguage({
-	id: 'mysql',
-	extensions: [],
-	aliases: ['MySQL', 'mysql'],
-	module: './mysql'
-});
-
-registerLanguage({
-	id: 'pgsql',
-	extensions: [],
-	aliases: ['PostgreSQL', 'postgres', 'pg', 'postgre'],
-	module: './pgsql'
-});
-
-registerLanguage({
-	id: 'redshift',
-	extensions: [],
-	aliases: ['Redshift', 'redshift'],
-	module: './redshift'
-});
-
-registerLanguage({
-	id: 'redis',
-	extensions: ['.redis'],
-	aliases: ['redis'],
-	module: './redis'
-});
-
-registerLanguage({
-	id: 'csp',
-	extensions: [],
-	aliases: ['CSP', 'csp'],
-	module: './csp'
-});
+import './bat/bat.contribution';
+import './coffee/coffee.contribution';
+import './cpp/cpp.contribution';
+import './csharp/csharp.contribution';
+import './csp/csp.contribution';
+import './css/css.contribution';
+import './dockerfile/dockerfile.contribution';
+import './fsharp/fsharp.contribution';
+import './go/go.contribution';
+import './handlebars/handlebars.contribution';
+import './html/html.contribution';
+import './ini/ini.contribution';
+import './java/java.contribution';
+import './less/less.contribution';
+import './lua/lua.contribution';
+import './markdown/markdown.contribution';
+import './msdax/msdax.contribution';
+import './mysql/mysql.contribution';
+import './objective-c/objective-c.contribution';
+import './pgsql/pgsql.contribution';
+import './php/php.contribution';
+import './postiats/postiats.contribution';
+import './powershell/powershell.contribution';
+import './pug/pug.contribution';
+import './python/python.contribution';
+import './r/r.contribution';
+import './razor/razor.contribution';
+import './redis/redis.contribution';
+import './redshift/redshift.contribution';
+import './ruby/ruby.contribution';
+import './sb/sb.contribution';
+import './scss/scss.contribution';
+import './solidity/solidity.contribution';
+import './sql/sql.contribution';
+import './swift/swift.contribution';
+import './vb/vb.contribution';
+import './xml/xml.contribution';
+import './yaml/yaml.contribution';

+ 17 - 0
src/msdax/msdax.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'msdax',
+	extensions: ['.dax', '.msdax'],
+	aliases: ['DAX', 'MSDAX'],
+	loader: () => _monaco.Promise.wrap(import('./msdax'))
+});

+ 1 - 1
test/msdax.test.ts → src/msdax/msdax.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('msdax', [
 	// Comments

+ 0 - 0
src/msdax.ts → src/msdax/msdax.ts


+ 17 - 0
src/mysql/mysql.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'mysql',
+	extensions: [],
+	aliases: ['MySQL', 'mysql'],
+	loader: () => _monaco.Promise.wrap(import('./mysql'))
+});

+ 1 - 1
test/mysql.test.ts → src/mysql/mysql.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('mysql', [
 	// Comments

+ 0 - 0
src/mysql.ts → src/mysql/mysql.ts


+ 17 - 0
src/objective-c/objective-c.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'objective-c',
+	extensions: ['.m'],
+	aliases: ['Objective-C'],
+	loader: () => _monaco.Promise.wrap(import('./objective-c'))
+});

+ 1 - 1
test/objective-c.test.ts → src/objective-c/objective-c.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('objective-c', [
 	// Keywords

+ 0 - 0
src/objective-c.ts → src/objective-c/objective-c.ts


+ 17 - 0
src/pgsql/pgsql.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'pgsql',
+	extensions: [],
+	aliases: ['PostgreSQL', 'postgres', 'pg', 'postgre'],
+	loader: () => _monaco.Promise.wrap(import('./pgsql'))
+});

+ 1 - 1
test/pgsql.test.ts → src/pgsql/pgsql.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('sql', [
 	// Comments

+ 0 - 0
src/pgsql.ts → src/pgsql/pgsql.ts


+ 18 - 0
src/php/php.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'php',
+	extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'],
+	aliases: ['PHP', 'php'],
+	mimetypes: ['application/x-php'],
+	loader: () => _monaco.Promise.wrap(import('./php'))
+});

+ 1 - 1
test/php.test.ts → src/php/php.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization(['php', 'css'], [
 	// Bug 13596:[ErrorTelemetry] Stream did not advance while tokenizing. Mode id is php (stuck)

+ 8 - 1
src/php.ts → src/php/php.ts

@@ -28,7 +28,14 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '(', close: ')', notIn: ['string'] },
 		{ open: '"', close: '"', notIn: ['string'] },
 		{ open: '\'', close: '\'', notIn: ['string', 'comment'] }
-	]
+	],
+
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*(#|\/\/)region\\b"),
+			end: new RegExp("^\\s*(#|\/\/)endregion\\b")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 17 - 0
src/postiats/postiats.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'postiats',
+	extensions: ['.dats', '.sats', '.hats'],
+	aliases: ['ATS', 'ATS/Postiats'],
+	loader: () => _monaco.Promise.wrap(import('./postiats'))
+});

+ 1 - 1
test/postiats.test.ts → src/postiats/postiats.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('postiats', [
 	// Keywords

+ 0 - 0
src/postiats.ts → src/postiats/postiats.ts


+ 17 - 0
src/powershell/powershell.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'powershell',
+	extensions: ['.ps1', '.psm1', '.psd1'],
+	aliases: ['PowerShell', 'powershell', 'ps', 'ps1'],
+	loader: () => _monaco.Promise.wrap(import('./powershell'))
+});

+ 1 - 1
test/powershell.test.ts → src/powershell/powershell.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('powershell', [
 	// Comments - single line

+ 7 - 1
src/powershell.ts → src/powershell/powershell.ts

@@ -33,7 +33,13 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '(', close: ')' },
 		{ open: '"', close: '"' },
 		{ open: '\'', close: '\'' },
-	]
+	],
+	folding: {
+		markers: {
+			start: new RegExp("^\\s*#region\\b"),
+			end: new RegExp("^\\s*#endregion\\b")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 17 - 0
src/pug/pug.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'pug',
+	extensions: ['.jade', '.pug'],
+	aliases: ['Pug', 'Jade', 'jade'],
+	loader: () => _monaco.Promise.wrap(import('./pug'))
+});

+ 1 - 1
test/pug.test.ts → src/pug/pug.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('pug', [
 	// Tags [Pug]

+ 4 - 1
src/pug.ts → src/pug/pug.ts

@@ -19,7 +19,10 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '{', close: '}', notIn: ['string', 'comment'] },
 		{ open: '[', close: ']', notIn: ['string', 'comment'] },
 		{ open: '(', close: ')', notIn: ['string', 'comment'] },
-	]
+	],
+	folding: {
+		offSide: true
+	}
 };
 
 export const language = <ILanguage>{

+ 18 - 0
src/python/python.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'python',
+	extensions: ['.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi'],
+	aliases: ['Python', 'py'],
+	firstLine: '^#!/.*\\bpython[0-9.-]*\\b',
+	loader: () => _monaco.Promise.wrap(import('./python'))
+});

+ 1 - 1
test/python.test.ts → src/python/python.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('python', [
 	// Keywords

+ 8 - 1
src/python.ts → src/python/python.ts

@@ -31,7 +31,14 @@ export const conf: IRichLanguageConfiguration = {
 		{ open: '(', close: ')' },
 		{ open: '"', close: '"' },
 		{ open: '\'', close: '\'' },
-	]
+	],
+	folding: {
+		offSide: true,
+		markers: {
+			start: new RegExp("^\\s*#region\\b"),
+			end: new RegExp("^\\s*#endregion\\b")
+		}
+	}
 };
 
 export const language = <ILanguage>{

+ 17 - 0
src/r/r.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'r',
+	extensions: ['.r', '.rhistory', '.rprofile', '.rt'],
+	aliases: ['R', 'r'],
+	loader: () => _monaco.Promise.wrap(import('./r'))
+});

+ 1 - 1
test/r.test.ts → src/r/r.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('r', [
 	// Keywords

+ 0 - 0
src/r.ts → src/r/r.ts


+ 18 - 0
src/razor/razor.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'razor',
+	extensions: ['.cshtml'],
+	aliases: ['Razor', 'razor'],
+	mimetypes: ['text/x-cshtml'],
+	loader: () => _monaco.Promise.wrap(import('./razor'))
+});

+ 1 - 1
test/razor.test.ts → src/razor/razor.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('razor', [
 

+ 0 - 0
src/razor.ts → src/razor/razor.ts


+ 17 - 0
src/redis/redis.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'redis',
+	extensions: ['.redis'],
+	aliases: ['redis'],
+	loader: () => _monaco.Promise.wrap(import('./redis'))
+});

+ 1 - 1
test/redis.test.ts → src/redis/redis.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('redis', [
 

+ 0 - 0
src/redis.ts → src/redis/redis.ts


+ 17 - 0
src/redshift/redshift.contribution.ts

@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'redshift',
+	extensions: [],
+	aliases: ['Redshift', 'redshift'],
+	loader: () => _monaco.Promise.wrap(import('./redshift'))
+});

+ 1 - 1
test/redshift.test.ts → src/redshift/redshift.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('sql', [
 	// Comments

+ 0 - 0
src/redshift.ts → src/redshift/redshift.ts


+ 18 - 0
src/ruby/ruby.contribution.ts

@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+
+import { registerLanguage } from '../_.contribution';
+
+// Allow for running under nodejs/requirejs in tests
+const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
+
+registerLanguage({
+	id: 'ruby',
+	extensions: ['.rb', '.rbx', '.rjs', '.gemspec', '.pp'],
+	filenames: ['rakefile'],
+	aliases: ['Ruby', 'rb'],
+	loader: () => _monaco.Promise.wrap(import('./ruby'))
+});

+ 9 - 1
test/ruby.test.ts → src/ruby/ruby.test.ts

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import { testTokenization } from './testRunner';
+import { testTokenization } from '../test/testRunner';
 
 testTokenization('ruby', [
 	// Keywords
@@ -134,5 +134,13 @@ testTokenization('ruby', [
 			{ startIndex: 0, type: 'identifier.ruby' },
 			{ startIndex: 1, type: 'string.heredoc.delimiter.ruby' }
 		]
+	}],
+
+	[{
+		line: 'x<<~HERE',
+		tokens: [
+			{ startIndex: 0, type: 'identifier.ruby' },
+			{ startIndex: 1, type: 'string.heredoc.delimiter.ruby' }
+		]
 	}]
 ]);

+ 1 - 1
src/ruby.ts → src/ruby/ruby.ts

@@ -179,7 +179,7 @@ export const language = <ILanguage>{
 			[/@@[\w]*/, 'namespace.class.identifier'],    // class
 
 			// here document
-			[/<<-(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
+			[/<<[-~](@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
 			[/[ \t\r\n]+<<(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
 			[/^<<(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно