mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
also check npm < 3.0 node modules location
This commit is contained in:
parent
19616c8a6f
commit
f999b64a46
1 changed files with 13 additions and 1 deletions
14
gulpfile.js
14
gulpfile.js
|
|
@ -31,7 +31,19 @@ gulp.task('release', ['clean-release','compile'], function() {
|
||||||
''
|
''
|
||||||
].join('\n');
|
].join('\n');
|
||||||
|
|
||||||
|
var jsoncLocation = __dirname + '/node_modules/jsonc-parser/lib';
|
||||||
|
if (!fs.existsSync(jsoncLocation)) {
|
||||||
|
var oldJsconcLocation = __dirname + '/node_modules/vscode-json-languageservice/node_modules/jsonc-parser/lib';
|
||||||
|
if (!fs.existsSync(oldJsconcLocation)) {
|
||||||
|
console.error('Unable to find jsonc node module at ' + jsoncLocation + ' or ' + oldJsconcLocation);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
jsoncLocation = oldJsconcLocation;
|
||||||
|
}
|
||||||
|
|
||||||
function bundleOne(moduleId, exclude) {
|
function bundleOne(moduleId, exclude) {
|
||||||
|
|
||||||
|
|
||||||
return rjs({
|
return rjs({
|
||||||
baseUrl: '/out/',
|
baseUrl: '/out/',
|
||||||
name: 'vs/language/json/' + moduleId,
|
name: 'vs/language/json/' + moduleId,
|
||||||
|
|
@ -50,7 +62,7 @@ gulp.task('release', ['clean-release','compile'], function() {
|
||||||
main: 'main'
|
main: 'main'
|
||||||
}, {
|
}, {
|
||||||
name: 'jsonc-parser',
|
name: 'jsonc-parser',
|
||||||
location: __dirname + '/node_modules/jsonc-parser/lib',
|
location: jsoncLocation,
|
||||||
main: 'main'
|
main: 'main'
|
||||||
}, {
|
}, {
|
||||||
name: 'vscode-nls',
|
name: 'vscode-nls',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue