Fixed line terminators
This commit is contained in:
parent
eb0c677534
commit
282ad07346
4 changed files with 83 additions and 1 deletions
28
extensions/javascript-migration/package.json
Normal file
28
extensions/javascript-migration/package.json
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
"name": "javascript-migration",
|
||||||
|
"displayName": "Helper extension for migrating to Salsa",
|
||||||
|
"description": "Informs users about the JS Salsa upgrade",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"publisher": "vscode",
|
||||||
|
"engines": {
|
||||||
|
"vscode": "*"
|
||||||
|
},
|
||||||
|
"categories": [
|
||||||
|
"Other"
|
||||||
|
],
|
||||||
|
"activationEvents": [
|
||||||
|
"onLanguage:javascript",
|
||||||
|
"onLanguage:javascriptreact"
|
||||||
|
],
|
||||||
|
"main": "./out/extension",
|
||||||
|
|
||||||
|
"scripts": {
|
||||||
|
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../gulpfile.plugins.js compile-plugin:javascript-migration ./src/tsconfig.json"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^1.7.5",
|
||||||
|
"vscode": "^0.11.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
}
|
||||||
|
}
|
42
extensions/javascript-migration/src/extension.ts
Normal file
42
extensions/javascript-migration/src/extension.ts
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* 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 * as vscode from 'vscode';
|
||||||
|
import * as cp from 'child_process';
|
||||||
|
|
||||||
|
|
||||||
|
export function activate(context: vscode.ExtensionContext) {
|
||||||
|
const releaseNotesShown = 'javascript.releasenotesshown';
|
||||||
|
|
||||||
|
if (!context.globalState.get(releaseNotesShown)) {
|
||||||
|
// cheating with nls, this is a temporary extenion only, that doesn't need be localized
|
||||||
|
vscode.window.showInformationMessage('The JavaScript infrastructure has changed, please read the change notes.', 'Change Notes').then(selection => {
|
||||||
|
if (selection) {
|
||||||
|
open('http://go.microsoft.com/fwlink/?LinkId=733559');
|
||||||
|
}
|
||||||
|
context.globalState.update(releaseNotesShown, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function open(url: string) {
|
||||||
|
var cmd: string;
|
||||||
|
|
||||||
|
switch (process.platform) {
|
||||||
|
case 'darwin':
|
||||||
|
cmd = 'open';
|
||||||
|
break;
|
||||||
|
case 'win32':
|
||||||
|
cmd = 'start';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
cmd = 'xdg-open';
|
||||||
|
}
|
||||||
|
return cp.exec(cmd + ' ' + url);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deactivate() {
|
||||||
|
}
|
12
extensions/javascript-migration/src/tsconfig.json
Normal file
12
extensions/javascript-migration/src/tsconfig.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"noLib": true,
|
||||||
|
"target": "es5",
|
||||||
|
"module": "commonjs",
|
||||||
|
"sourceMap": false,
|
||||||
|
"outDir": "../out"
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"node_modules"
|
||||||
|
]
|
||||||
|
}
|
2
extensions/node.d.ts
vendored
2
extensions/node.d.ts
vendored
|
@ -648,7 +648,7 @@ declare module "child_process" {
|
||||||
maxBuffer?: number;
|
maxBuffer?: number;
|
||||||
killSignal?: string;
|
killSignal?: string;
|
||||||
}, callback: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
|
}, callback: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
|
||||||
export function exec(command: string, callback: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
|
export function exec(command: string, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
|
||||||
export function execFile(file: string, args: string[], options: {
|
export function execFile(file: string, args: string[], options: {
|
||||||
cwd?: string;
|
cwd?: string;
|
||||||
stdio?: any;
|
stdio?: any;
|
||||||
|
|
Loading…
Reference in a new issue