Explorar o código

Add support to run from source using `tsc -w`

Alex Dima %!s(int64=3) %!d(string=hai) anos
pai
achega
8f2bc4ac98
Modificáronse 2 ficheiros con 17 adicións e 0 borrados
  1. 5 0
      metadata.js
  2. 12 0
      test/manual/dev-setup.js

+ 5 - 0
metadata.js

@@ -18,6 +18,7 @@
 				rootPath: './out/release/typescript',
 				paths: {
 					// use ./ to indicate it is relative to the `rootPath`
+					src: './../../amd/typescript',
 					dev: './dev',
 					min: './min',
 					esm: './esm'
@@ -30,6 +31,7 @@
 				rootPath: './out/release/css',
 				paths: {
 					// use ./ to indicate it is relative to the `rootPath`
+					src: './../../amd/css',
 					dev: './dev',
 					min: './min',
 					esm: './esm'
@@ -42,6 +44,7 @@
 				rootPath: './out/release/json',
 				paths: {
 					// use ./ to indicate it is relative to the `rootPath`
+					src: './../../amd/json',
 					dev: './dev',
 					min: './min',
 					esm: './esm'
@@ -54,6 +57,7 @@
 				rootPath: './out/release/html',
 				paths: {
 					// use ./ to indicate it is relative to the `rootPath`
+					src: './../../amd/html',
 					dev: './dev',
 					min: './min',
 					esm: './esm'
@@ -66,6 +70,7 @@
 				rootPath: './out/release/basic-languages',
 				paths: {
 					// use ./ to indicate it is relative to the `rootPath`
+					src: './../../amd/basic-languages',
 					dev: './dev',
 					min: './min',
 					esm: './esm'

+ 12 - 0
test/manual/dev-setup.js

@@ -207,6 +207,18 @@
 
 		loadScript(RESOLVED_CORE.getResolvedPath(PATH_PREFIX) + '/loader.js', function () {
 			let loaderPathsConfig = {};
+			window.AMD = true;
+			if (IS_FILE_PROTOCOL) {
+				loaderPathsConfig['vs/language/fillers/monaco-editor-core'] =
+					DIRNAME + '/.././out/amd/fillers/monaco-editor-core-amd';
+				loaderPathsConfig['vs/fillers/monaco-editor-core'] =
+					DIRNAME + '/.././out/amd/fillers/monaco-editor-core-amd';
+			} else {
+				loaderPathsConfig['vs/language/fillers/monaco-editor-core'] =
+					PATH_PREFIX + '/monaco-editor/./out/amd/fillers/monaco-editor-core-amd';
+				loaderPathsConfig['vs/fillers/monaco-editor-core'] =
+					PATH_PREFIX + '/monaco-editor/./out/amd/fillers/monaco-editor-core-amd';
+			}
 			if (!RESOLVED_CORE.isRelease()) {
 				RESOLVED_PLUGINS.forEach(function (plugin) {
 					plugin.generateLoaderConfig(loaderPathsConfig, PATH_PREFIX);