Skip to content
Snippets Groups Projects
Verified Commit f004a635 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

feat: hello

parent 77609266
No related branches found
No related tags found
No related merge requests found
......@@ -9,18 +9,10 @@
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/test/suite/index"
]
}
]
}
......@@ -7,3 +7,11 @@ vsc-extension-quickstart.md
**/jsconfig.json
**/*.map
**/.eslintrc.json
.vscode
node_modules
out/
source/
tsconfig.json
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// source/extension.mjs
var extension_exports = {};
__export(extension_exports, {
activate: () => activate,
deactivate: () => deactivate
});
module.exports = __toCommonJS(extension_exports);
var vscode = __toESM(require("vscode"), 1);
var isWeb = false;
if (isWeb) {
console.log("web");
} else {
console.log("something");
}
function activate(context) {
console.log('Congratulations, your extension "helloworld-minimal-sample" is now active!');
let disposable = vscode.commands.registerCommand("extension.helloWorld", () => {
vscode.window.showInformationMessage("Hello World!");
});
context.subscriptions.push(disposable);
}
function deactivate() {
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
activate,
deactivate
});
//# sourceMappingURL=extension.js.map
{
"version": 3,
"sources": ["../source/extension.mjs"],
"sourcesContent": ["import * as vscode from 'vscode';\n//import * as vscodeWeb from 'vscode-web';\n\n\nlet isWeb = false;\n//if (typeof vscodeWeb !== 'undefined') {\n// isWeb = true;\n//}\n\nif (isWeb) {\n\tconsole.log(\"web\")\n // Code f\u00FCr die Web-Version von VS Code\n} else {\n\tconsole.log(\"something\")\n // Code f\u00FCr die Desktop-Version von VS Code\n}\n\nexport function activate(context) {\n console.log('Congratulations, your extension \"helloworld-minimal-sample\" is now active!');\n\t\n let disposable = vscode.commands.registerCommand('extension.helloWorld', () => {\n\t\t// The code you place here will be executed every time your command is executed\n\n\t\t// Display a message box to the user\n\t\tvscode.window.showInformationMessage('Hello World!');\n\t});\n\n\tcontext.subscriptions.push(disposable);\n}\n\nexport function deactivate() {}\n\n\n/**\nconst view = vscode.window.createWebviewView('myView', 'My Button', vscode.ViewColumn.Beside, {});\nview.webview.html = '<button>Hello World</button>';\n\n\nview.reveal({ select: false, focus: false });\n\n\nview.webview.onDidReceiveMessage(message => {\n if (message.command === 'buttonClicked') {\n vscode.window.showInformationMessage('Button clicked!');\n }\n});\n */"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AAIxB,IAAI,QAAQ;AAKZ,IAAI,OAAO;AACV,UAAQ,IAAI,KAAK;AAElB,OAAO;AACN,UAAQ,IAAI,WAAW;AAExB;AAEO,SAAS,SAAS,SAAS;AAChC,UAAQ,IAAI,4EAA4E;AAExF,MAAI,aAAoB,gBAAS,gBAAgB,wBAAwB,MAAM;AAI/E,IAAO,cAAO,uBAAuB,cAAc;AAAA,EACpD,CAAC;AAED,UAAQ,cAAc,KAAK,UAAU;AACtC;AAEO,SAAS,aAAa;AAAC;",
"names": []
}
import * as vscode from 'vscode';
import * as vscodeWeb from 'vscode-web';
import { web } from 'webpack';
let isWeb = false;
if (typeof vscodeWeb !== 'undefined') {
isWeb = true;
}
if (isWeb) {
console.log("web")
// Code für die Web-Version von VS Code
} else {
console.log("something")
// Code für die Desktop-Version von VS Code
}
export function activate(context: vscode.ExtensionContext) {
// Gemeinsamer Code für beide Versionen von VS Code
}
\ No newline at end of file
This diff is collapsed.
......@@ -9,15 +9,14 @@
},
"icon": "icon.png",
"galleryBanner": {
"color": "#6682BA",
"color": "#c54883",
"theme": "dark"
},
"type": "module",
"homepage": "https://monsterjs.org",
"pricing": "Free",
"version": "0.0.3",
"version": "0.0.5",
"engines": {
"vscode": "^1.77.0"
"vscode": "^1.76.0"
},
"categories": [
"Programming Languages",
......@@ -37,13 +36,12 @@
],
"publisher": "Monster",
"activationEvents": [],
"main": "./extension.mjs",
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "monster.helloWorld",
"title": "Hello World",
"enablement": "resourceExtname == .html"
"command": "extension.helloWorld",
"title": "Hello World"
}
],
"configuration": [
......@@ -60,31 +58,19 @@
]
},
"scripts": {
"lint": "eslint .",
"pretest": "pnpm run lint",
"test": "node ./test/runTest.js"
"vscode:prepublish": "npm run esbuild-base -- --minify",
"esbuild-base": "esbuild ./source/extension.mjs --bundle --outfile=dist/extension.js --external:vscode --external:vscode-web --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch"
},
"devDependencies": {
"@vscode/vsce": "^2.19.0",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@types/vscode": "^1.77.0",
"@types/vscode": "^1.76.0",
"@vscode/test-electron": "^2.3.0",
"@vscode/vsce": "^2.19.0",
"chai": "^4.3.4",
"esbuild": "^0.17.16",
"eslint": "^8.36.0",
"glob": "^8.1.0",
"mocha": "^10.2.0",
"typescript": "^4.9.5",
"ts-loader": "^9.2.6",
"webpack": "^5.64.4",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.5.0",
"mocha-webpack": "^2.2.0",
"chai": "^4.3.4",
"@types/chai": "^4.2.21"
},
"dependencies": {
"vscode-web": "^1.77.1"
"mocha": "^10.2.0"
}
}
import * as vscode from 'vscode';
//import * as vscodeWeb from 'vscode-web';
let isWeb = false;
//if (typeof vscodeWeb !== 'undefined') {
// isWeb = true;
//}
if (isWeb) {
console.log("web")
// Code für die Web-Version von VS Code
} else {
console.log("something")
// Code für die Desktop-Version von VS Code
}
export function activate(context) {
console.log('Congratulations, your extension "helloworld-minimal-sample" is now active!');
let disposable = vscode.commands.registerCommand('extension.helloWorld', () => {
// The code you place here will be executed every time your command is executed
// Display a message box to the user
vscode.window.showInformationMessage('Hello World!');
});
context.subscriptions.push(disposable);
}
export function deactivate() {}
/**
const view = vscode.window.createWebviewView('myView', 'My Button', vscode.ViewColumn.Beside, {});
view.webview.html = '<button>Hello World</button>';
view.reveal({ select: false, focus: false });
view.webview.onDidReceiveMessage(message => {
if (message.command === 'buttonClicked') {
vscode.window.showInformationMessage('Button clicked!');
}
});
*/
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment