Skip to content

Commit 5733913

Browse files
Copilotosortega
andcommitted
Create Hello World extension with basic structure and TypeScript compilation
Co-authored-by: osortega <[email protected]>
1 parent 76d4693 commit 5733913

File tree

5 files changed

+76
-0
lines changed

5 files changed

+76
-0
lines changed

build/gulpfile.extensions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const compilations = [
4141
'extensions/github-authentication/tsconfig.json',
4242
'extensions/grunt/tsconfig.json',
4343
'extensions/gulp/tsconfig.json',
44+
'extensions/hello-world/tsconfig.json',
4445
'extensions/html-language-features/client/tsconfig.json',
4546
'extensions/html-language-features/server/tsconfig.json',
4647
'extensions/ipynb/tsconfig.json',

extensions/hello-world/.vscodeignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
out/test/**
2+
src/**
3+
.vscode-test/**
4+
.gitignore
5+
tsconfig.json
6+
.vscode/**

extensions/hello-world/package.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "hello-world",
3+
"displayName": "Hello World",
4+
"description": "A simple Hello World extension for VS Code",
5+
"version": "1.0.0",
6+
"publisher": "vscode",
7+
"license": "MIT",
8+
"engines": {
9+
"vscode": "^1.4.0"
10+
},
11+
"categories": [
12+
"Other"
13+
],
14+
"activationEvents": [
15+
"onCommand:helloWorld.hello"
16+
],
17+
"main": "./out/extension",
18+
"contributes": {
19+
"commands": [
20+
{
21+
"command": "helloWorld.hello",
22+
"title": "Hello World"
23+
}
24+
]
25+
},
26+
"scripts": {
27+
"compile": "gulp compile-extension:hello-world",
28+
"watch": "gulp watch-extension:hello-world"
29+
},
30+
"devDependencies": {
31+
"@types/node": "22.x"
32+
},
33+
"capabilities": {
34+
"virtualWorkspaces": true,
35+
"untrustedWorkspaces": {
36+
"supported": true
37+
}
38+
},
39+
"repository": {
40+
"type": "git",
41+
"url": "https://github.com/microsoft/vscode.git"
42+
}
43+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
import * as vscode from 'vscode';
7+
8+
export function activate(context: vscode.ExtensionContext) {
9+
const disposable = vscode.commands.registerCommand('helloWorld.hello', () => {
10+
vscode.window.showInformationMessage('Hello World from VS Code!');
11+
});
12+
13+
context.subscriptions.push(disposable);
14+
}
15+
16+
export function deactivate() {}

extensions/hello-world/tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "./out"
5+
},
6+
"include": [
7+
"src/**/*",
8+
"../../src/vscode-dts/vscode.d.ts"
9+
]
10+
}

0 commit comments

Comments
 (0)