|
@@ -0,0 +1,109 @@
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
+<html>
|
|
|
|
+<head>
|
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
|
|
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
|
|
+ <link rel="stylesheet" data-name="vs/editor/editor.main" href="../node_modules/monaco-editor-core/dev/vs/editor/editor.main.css">
|
|
|
|
+</head>
|
|
|
|
+<body>
|
|
|
|
+
|
|
|
|
+<h2>Monaco Editor JSON test page</h2>
|
|
|
|
+<div id="container" style="width:800px;height:600px;border:1px solid grey"></div>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ // Loading basic-languages to get the json language definition
|
|
|
|
+ var require = {
|
|
|
|
+ paths: {
|
|
|
|
+ 'vs/basic-languages': '../node_modules/monaco-languages/release',
|
|
|
|
+ 'vs/language/json': '../release/dev',
|
|
|
|
+ 'vs': '../node_modules/monaco-editor-core/dev/vs'
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+</script>
|
|
|
|
+<script src="../node_modules/monaco-editor-core/dev/vs/loader.js"></script>
|
|
|
|
+<script src="../node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.js"></script>
|
|
|
|
+<script src="../node_modules/monaco-editor-core/dev/vs/editor/editor.main.js"></script>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ require([
|
|
|
|
+ 'vs/basic-languages/src/monaco.contribution',
|
|
|
|
+ 'vs/language/json/monaco.contribution'
|
|
|
|
+ ], function() {
|
|
|
|
+ var editor = monaco.editor.create(document.getElementById('container'), {
|
|
|
|
+ value: [
|
|
|
|
+ '{',
|
|
|
|
+ ' "type": "team",',
|
|
|
|
+ ' "test": {',
|
|
|
|
+ ' "testPage": "tools/testing/run-tests.htm",',
|
|
|
|
+ ' "enabled": true',
|
|
|
|
+ ' },',
|
|
|
|
+ ' "search": {',
|
|
|
|
+ ' "excludeFolders": [',
|
|
|
|
+ ' ".git",',
|
|
|
|
+ ' "node_modules",',
|
|
|
|
+ ' "tools/bin",',
|
|
|
|
+ ' "tools/counts",',
|
|
|
|
+ ' "tools/policheck",',
|
|
|
|
+ ' "tools/tfs_build_extensions",',
|
|
|
|
+ ' "tools/testing/jscoverage",',
|
|
|
|
+ ' "tools/testing/qunit",',
|
|
|
|
+ ' "tools/testing/chutzpah",',
|
|
|
|
+ ' "server.net"',
|
|
|
|
+ ' ]',
|
|
|
|
+ ' },',
|
|
|
|
+ ' "languages": {',
|
|
|
|
+ ' "vs.languages.typescript": {',
|
|
|
|
+ ' "validationSettings": [{',
|
|
|
|
+ ' "scope":"/",',
|
|
|
|
+ ' "noImplicitAny":true,',
|
|
|
|
+ ' "noLib":false,',
|
|
|
|
+ ' "extraLibs":[],',
|
|
|
|
+ ' "semanticValidation":true,',
|
|
|
|
+ ' "syntaxValidation":true,',
|
|
|
|
+ ' "codeGenTarget":"ES5",',
|
|
|
|
+ ' "moduleGenTarget":"",',
|
|
|
|
+ ' "lint": {',
|
|
|
|
+ ' "emptyBlocksWithoutComment": "warning",',
|
|
|
|
+ ' "curlyBracketsMustNotBeOmitted": "warning",',
|
|
|
|
+ ' "comparisonOperatorsNotStrict": "warning",',
|
|
|
|
+ ' "missingSemicolon": "warning",',
|
|
|
|
+ ' "unknownTypeOfResults": "warning",',
|
|
|
|
+ ' "semicolonsInsteadOfBlocks": "warning",',
|
|
|
|
+ ' "functionsInsideLoops": "warning",',
|
|
|
|
+ ' "functionsWithoutReturnType": "warning",',
|
|
|
|
+ ' "tripleSlashReferenceAlike": "warning",',
|
|
|
|
+ ' "unusedImports": "warning",',
|
|
|
|
+ ' "unusedVariables": "warning",',
|
|
|
|
+ ' "unusedFunctions": "warning",',
|
|
|
|
+ ' "unusedMembers": "warning"',
|
|
|
|
+ ' }',
|
|
|
|
+ ' },',
|
|
|
|
+ ' {',
|
|
|
|
+ ' "scope":"/client",',
|
|
|
|
+ ' "baseUrl":"/client",',
|
|
|
|
+ ' "moduleGenTarget":"amd"',
|
|
|
|
+ ' },',
|
|
|
|
+ ' {',
|
|
|
|
+ ' "scope":"/server",',
|
|
|
|
+ ' "moduleGenTarget":"commonjs"',
|
|
|
|
+ ' },',
|
|
|
|
+ ' {',
|
|
|
|
+ ' "scope":"/build",',
|
|
|
|
+ ' "moduleGenTarget":"commonjs"',
|
|
|
|
+ ' },',
|
|
|
|
+ ' {',
|
|
|
|
+ ' "scope":"/node_modules/nake",',
|
|
|
|
+ ' "moduleGenTarget":"commonjs"',
|
|
|
|
+ ' }],',
|
|
|
|
+ ' "allowMultipleWorkers": true',
|
|
|
|
+ ' }',
|
|
|
|
+ ' }',
|
|
|
|
+ '}',
|
|
|
|
+ ].join('\n'),
|
|
|
|
+ language: 'json'
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+</body>
|
|
|
|
+</html>
|