|
@@ -11,10 +11,7 @@
|
|
|
</head>
|
|
|
<body>
|
|
|
<h2>Monaco Editor JSON test page</h2>
|
|
|
- <div
|
|
|
- id="container"
|
|
|
- style="width: 800px; height: 600px; border: 1px solid grey"
|
|
|
- ></div>
|
|
|
+ <div id="container" style="width: 800px; height: 600px; border: 1px solid grey"></div>
|
|
|
|
|
|
<script>
|
|
|
// Loading basic-languages to get the json language definition
|
|
@@ -44,82 +41,79 @@
|
|
|
'vs/basic-languages/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'
|
|
|
- }
|
|
|
- );
|
|
|
+ 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>
|