From 59d79a9a2bdada35039ec8e57fba6152e468b2f8 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 26 Sep 2016 22:35:04 +0300 Subject: [PATCH] Fixes Microsoft/monaco-editor#204: Do what monaco-html does to resolve vscode-uri --- .vscode/settings.json | 3 ++- gulpfile.js | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1dc255b6..24d16b2e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,5 +5,6 @@ "**/node_modules": true, "**/release": true, "**/out": true - } + }, + "typescript.tsdk": "./node_modules/typescript/lib" } \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index e56bd310..06677a3b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -41,6 +41,22 @@ gulp.task('release', ['clean-release','compile'], function() { jsoncLocation = oldJsconcLocation; } + function getDependencyLocation(name, libLocation, container) { + var location = __dirname + '/node_modules/' + name + '/' + libLocation; + if (!fs.existsSync(location)) { + var oldLocation = __dirname + '/node_modules/' + container + '/node_modules/' + name + '/' + libLocation; + if (!fs.existsSync(oldLocation)) { + console.error('Unable to find ' + name + ' node module at ' + location + ' or ' + oldLocation); + return; + } + return oldLocation; + } + return location; + } + + var uriLocation = getDependencyLocation('vscode-uri', 'lib', 'vscode-html-languageservice'); + + function bundleOne(moduleId, exclude) { @@ -64,6 +80,10 @@ gulp.task('release', ['clean-release','compile'], function() { name: 'jsonc-parser', location: jsoncLocation, main: 'main' + }, { + name: 'vscode-uri', + location: uriLocation, + main: 'index' }, { name: 'vscode-nls', location: __dirname + '/out/fillers',