mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
Move bower/package.json dependency completions to javascript extension
This commit is contained in:
27
extensions/javascript/src/javascriptMain.ts
Normal file
27
extensions/javascript/src/javascriptMain.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import {addJSONProviders} from './features/jsonContributions';
|
||||
import * as httpRequest from 'request-light';
|
||||
|
||||
import {ExtensionContext, env, workspace} from 'vscode';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
export function activate(context: ExtensionContext): any {
|
||||
nls.config({locale: env.language});
|
||||
|
||||
configureHttpRequest();
|
||||
workspace.onDidChangeConfiguration(e => configureHttpRequest());
|
||||
|
||||
addJSONProviders(httpRequest.xhr, context.subscriptions);
|
||||
}
|
||||
|
||||
function configureHttpRequest() {
|
||||
let httpSettings = workspace.getConfiguration('http');
|
||||
httpRequest.configure(httpSettings.get<string>('proxy'), httpSettings.get<boolean>('proxyStrictSSL'));
|
||||
}
|
||||
Reference in New Issue
Block a user