Skip to content

Commit 9136cff

Browse files
committed
Add builtin plugin for code-server integration
1 parent cbc2e8b commit 9136cff

File tree

12 files changed

+118
-2
lines changed

12 files changed

+118
-2
lines changed

lib/vscode/build/gulpfile.extensions.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
3131
// ignore: ['**/out/**', '**/node_modules/**']
3232
// });
3333
const compilations = [
34+
'code-server/tsconfig.json',
3435
'configuration-editing/build/tsconfig.json',
3536
'configuration-editing/tsconfig.json',
3637
'css-language-features/client/tsconfig.json',
@@ -336,5 +337,3 @@ async function webpackExtensions(taskName, isWatch, webpackConfigLocations) {
336337
}
337338
});
338339
}
339-
340-

lib/vscode/build/npm/dirs.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ exports.dirs = [
99
'build',
1010
'build/lib/watch',
1111
'extensions',
12+
'extensions/code-server',
1213
'extensions/configuration-editing',
1314
'extensions/css-language-features',
1415
'extensions/css-language-features/server',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
src/**
2+
test/**
3+
out/**
4+
tsconfig.json
5+
build/**
6+
extension.webpack.config.js
7+
yarn.lock
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# code-server integration for Visual Studio Code
2+
3+
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
//@ts-check
7+
8+
'use strict';
9+
10+
const withDefaults = require('../shared.webpack.config');
11+
12+
module.exports = withDefaults({
13+
context: __dirname,
14+
entry: {
15+
extension: './src/main.ts'
16+
}
17+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "code-server",
3+
"displayName": "%displayName%",
4+
"description": "%description%",
5+
"publisher": "coder",
6+
"license": "MIT",
7+
"version": "1.0.0",
8+
"engines": {
9+
"vscode": "^1.5.0"
10+
},
11+
"enableProposedApi": true,
12+
"categories": [
13+
"Other"
14+
],
15+
"activationEvents": [
16+
"*"
17+
],
18+
"main": "./out/main",
19+
"icon": "resources/icons/code-server.png",
20+
"scripts": {
21+
"compile": "gulp compile-extension:code-server",
22+
"watch": "gulp watch-extension:code-server"
23+
},
24+
"contributes": {
25+
"commands": [
26+
{
27+
"command": "code-server.logout",
28+
"title": "%command.logout%",
29+
"category": "code-server"
30+
}
31+
],
32+
"menus": {
33+
"commandPalette": [
34+
{
35+
"command": "code-server.logout",
36+
"when": "code-server.authed"
37+
}
38+
]
39+
}
40+
},
41+
"dependencies": {
42+
"vscode-nls": "^4.0.0"
43+
},
44+
"repository": {
45+
"type": "git",
46+
"url": "https://github.com/cdr/code-server.git"
47+
}
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"displayName": "code-server",
3+
"description": "code-server",
4+
"command.logout": "Logout"
5+
}
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ExtensionContext } from 'vscode';
2+
3+
// import * as nls from 'vscode-nls';
4+
// const localize = nls.loadMessageBundle();
5+
6+
export async function activate(context: ExtensionContext): Promise<void> {
7+
console.log('ACTIVATED');
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
/// <reference path='../../../../src/vs/vscode.d.ts'/>
7+
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../shared.tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "./out",
5+
"experimentalDecorators": true,
6+
"typeRoots": [
7+
"../../node_modules/@types"
8+
]
9+
},
10+
"include": [
11+
"src/**/*"
12+
]
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
vscode-nls@^4.0.0:
6+
version "4.1.2"
7+
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167"
8+
integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==

0 commit comments

Comments
 (0)