From 8f2bc4ac98bbbce140594eca0a1e11aa493771bc Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 27 Jan 2022 16:54:31 +0100 Subject: [PATCH] Add support to run from source using `tsc -w` --- metadata.js | 5 +++++ test/manual/dev-setup.js | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/metadata.js b/metadata.js index d74f298a..6215731d 100644 --- a/metadata.js +++ b/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' diff --git a/test/manual/dev-setup.js b/test/manual/dev-setup.js index 034e5afe..ff95c1eb 100644 --- a/test/manual/dev-setup.js +++ b/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);