diff --git a/metadata.js b/metadata.js index 282515c4..e74cdf3b 100644 --- a/metadata.js +++ b/metadata.js @@ -4,8 +4,8 @@ CORE: { paths: { npm: 'node_modules/monaco-editor-core/min/vs', - dev: '/vscode/out/vs' - // dev: '/vscode/out-monaco-editor-core/min/vs', + dev: '/vscode/out/vs', + built: '/vscode/out-monaco-editor-core/min/vs', } }, PLUGINS: [{ diff --git a/test/dev-setup.js b/test/dev-setup.js index d8d6ccd5..cb40e220 100644 --- a/test/dev-setup.js +++ b/test/dev-setup.js @@ -1,5 +1,7 @@ (function() { + var IS_FILE_PROTOCOL = (window.location.protocol === 'file:'); + var LOADER_OPTS = (function() { function parseQueryString() { var str = window.location.search; @@ -32,7 +34,15 @@ Component.prototype.getResolvedPath = function() { var resolvedPath = this.paths[this.selectedPath]; if (this.selectedPath === 'npm') { - resolvedPath = '/monaco-editor/' + resolvedPath; + if (IS_FILE_PROTOCOL) { + resolvedPath = '../' + resolvedPath; + } else { + resolvedPath = '/monaco-editor/' + resolvedPath; + } + } else { + if (IS_FILE_PROTOCOL) { + resolvedPath = '../..' + resolvedPath; + } } return resolvedPath; };