Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • oss/libraries/javascript/vs-code-extension
1 result
Show changes
Commits on Source (4)
Showing
with 1752 additions and 124 deletions
File moved
File moved
......@@ -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
File moved
File moved
# monster README
# Monster JS Extension
Introducing our Visual Studio Code extension, which seamlessly integrates the Monster Framework and Monster Components into your
VSCode environment. The Monster Framework is a collection of JavaScript classes and functions designed to streamline your
......@@ -31,14 +31,7 @@ Please note that this extension is currently in development, and we are actively
## Release Notes
See [CHANGELOG](https://gitlab.schukai.com/oss/libraries/javascript/vs-code-extension/-/blob/master/CHANGELOG.md)
---
## Working with Markdown
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
See [CHANGELOG](https://marketplace.visualstudio.com/items/Monster.monster-js/changelog)
## For more information
......
var d=Object.create;var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var u=(e,o)=>{for(var n in o)c(e,n,{get:o[n],enumerable:!0})},a=(e,o,n,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of m(o))!p.call(e,t)&&t!==n&&c(e,t,{get:()=>o[t],enumerable:!(i=l(o,t))||i.enumerable});return e};var w=(e,o,n)=>(n=e!=null?d(v(e)):{},a(o||!e||!e.__esModule?c(n,"default",{value:e,enumerable:!0}):n,e)),b=e=>a(c({},"__esModule",{value:!0}),e);var U={};u(U,{activate:()=>h,deactivate:()=>D});module.exports=b(U);var s=w(require("vscode"),1);function h(e){let o=s.commands.registerCommand("monster.open-doc",()=>{let n;s.env.openExternal(s.Uri.parse("https://monsterjs.org/en/doc/"));let i=s.Uri.joinPath(e.extensionUri,"documentation");n=t.webview.asWebviewUri(i);let t=s.window.createWebviewPanel("monsterDocumentation","Monster JS Documentation",s.ViewColumn.One,{enableScripts:!0,localResourceRoots:[n]});getWebviewContent(e).then(r=>{t.webview.html=r}).catch(r=>{console.log(r)}),t.onDidDispose(()=>{},null,e.subscriptions)});e.subscriptions.push(o)}function D(){}0&&(module.exports={activate,deactivate});
{
"version": 3,
"sources": ["../source/extension.mjs"],
"sourcesContent": ["import * as vscode from 'vscode';\n\n// see https://code.visualstudio.com/api/extension-guides/webview\n\nexport function activate(context) {\n\n let disposable = vscode.commands.registerCommand('monster.open-doc', () => {\n // The code you place here will be executed every time your command is executed\n\n let documentationUrls;\n\n vscode.env.openExternal(vscode.Uri.parse('https://monsterjs.org/en/doc/'));\n\n const onDiskPath = vscode.Uri.joinPath(context.extensionUri, 'documentation');\n \n\n documentationUrls = panel.webview.asWebviewUri(onDiskPath);\n \n\n const panel = vscode.window.createWebviewPanel(\n 'monsterDocumentation', // Identifies the type of the webview. Used internally\n 'Monster JS Documentation', // Title of the panel displayed to the user\n vscode.ViewColumn.One,\n {\n enableScripts: true,\n localResourceRoots: [documentationUrls]\n } // Webview options. More on these later.\n );\n\n getWebviewContent(context).then(html => {\n panel.webview.html = html;\n }).catch(error => {\n console.log(error)\n })\n // \n panel.onDidDispose(\n () => {\n // When the panel is closed, cancel any future updates to the webview content\n\n },\n null,\n context.subscriptions\n );\n\n });\n\n context.subscriptions.push(disposable);\n}\n\nexport function deactivate() { }"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AAIjB,SAAS,SAAS,SAAS;AAEhC,MAAI,aAAoB,gBAAS,gBAAgB,oBAAoB,MAAM;AAGzE,QAAI;AAEJ,IAAO,WAAI,aAAoB,WAAI,MAAM,+BAA+B,CAAC;AAEzE,UAAM,aAAoB,WAAI,SAAS,QAAQ,cAAc,eAAe;AAG5E,wBAAoB,MAAM,QAAQ,aAAa,UAAU;AAGzD,UAAM,QAAe,cAAO;AAAA,MAC1B;AAAA;AAAA,MACA;AAAA;AAAA,MACO,kBAAW;AAAA,MAClB;AAAA,QACE,eAAe;AAAA,QACf,oBAAoB,CAAC,iBAAiB;AAAA,MACxC;AAAA;AAAA,IACF;AAEA,sBAAkB,OAAO,EAAE,KAAK,UAAQ;AACtC,YAAM,QAAQ,OAAO;AAAA,IACvB,CAAC,EAAE,MAAM,WAAS;AAChB,cAAQ,IAAI,KAAK;AAAA,IACnB,CAAC;AAED,UAAM;AAAA,MACJ,MAAM;AAAA,MAGN;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,IACV;AAAA,EAEF,CAAC;AAED,UAAQ,cAAc,KAAK,UAAU;AACvC;AAEO,SAAS,aAAa;AAAE;",
"names": []
}
File moved
File moved
......@@ -4,70 +4,74 @@
"displayName": "Monster JS",
"description": "The Monster Extension for Visual Studio Code is a powerful tool designed to streamline the development process when working with the Monster JavaScript library and Web Components.",
"repository": {
"type": "git",
"url": "https://gitlab.schukai.com/oss/libraries/javascript/vs-code-extension.git"
},
"type": "git",
"url": "https://gitlab.schukai.com/oss/libraries/javascript/vs-code-extension.git"
},
"icon": "icon.png",
"galleryBanner": {
"color": "#ffffff",
"theme": "dark"
},
"color": "#c54883",
"theme": "dark"
},
"homepage": "https://monsterjs.org",
"pricing": "Free",
"version": "0.0.2",
"version": "0.0.7",
"engines": {
"vscode": "^1.77.0"
"vscode": "^1.76.0"
},
"categories": [
"Extension Packs",
"Programming Languages",
"Snippets",
"Other"
],
"keywords": [
"css",
"html",
"keywords": [
"css",
"html",
"js",
"javascript",
"javascript",
"monster",
"monster-js",
"web components",
"custom elements",
"multi-root ready"
],
"multi-root ready"
],
"publisher": "Monster",
"activationEvents": [],
"main": "./extension.js",
"main": "./dist/extension.js",
"contributes": {
"commands": [{
"command": "monster.helloWorld",
"title": "Hello World",
"enablement": "resourceExtname == .html"
}],
"commands": [
{
"command": "monster.open-doc",
"title": "Open Monster JS Documentation"
}
],
"configuration": [
{
"title": "Test 1",
"properties": {
"monster-js.test": {
"type": "boolean",
"description": "Test boolean",
"deprecationMessage": "Check this value!"
}
{
"title": "Test 1",
"properties": {
"monster-js.test": {
"type": "boolean",
"description": "Test boolean",
"deprecationMessage": "Check this value!"
}
}
}
]
},
},
"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",
"publish": "npm run esbuild-base; npx vsce publish"
},
"devDependencies": {
"@types/vscode": "^1.77.0",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@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",
"@vscode/test-electron": "^2.3.0"
"mocha": "^10.2.0"
}
}
import * as vscode from 'vscode';
// see https://code.visualstudio.com/api/extension-guides/webview
export function activate(context) {
let disposable = vscode.commands.registerCommand('monster.open-doc', () => {
// The code you place here will be executed every time your command is executed
let documentationUrls;
vscode.env.openExternal(vscode.Uri.parse('https://monsterjs.org/en/doc/'));
const onDiskPath = vscode.Uri.joinPath(context.extensionUri, 'documentation');
documentationUrls = panel.webview.asWebviewUri(onDiskPath);
const panel = vscode.window.createWebviewPanel(
'monsterDocumentation', // Identifies the type of the webview. Used internally
'Monster JS Documentation', // Title of the panel displayed to the user
vscode.ViewColumn.One,
{
enableScripts: true,
localResourceRoots: [documentationUrls]
} // Webview options. More on these later.
);
getWebviewContent(context).then(html => {
panel.webview.html = html;
}).catch(error => {
console.log(error)
})
//
panel.onDidDispose(
() => {
// When the panel is closed, cancel any future updates to the webview content
},
null,
context.subscriptions
);
});
context.subscriptions.push(disposable);
}
export function deactivate() { }
\ No newline at end of file
File moved
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
const vscode = require('vscode');
// This method is called when your extension is activated
// Your extension is activated the very first time the command is executed
/**
* @param {vscode.ExtensionContext} context
*/
function activate(context) {
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "monster" is now active!');
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
let disposable = vscode.commands.registerCommand('monster.helloWorld', function () {
// 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 from Monster!');
});
context.subscriptions.push(disposable);
}
// This method is called when your extension is deactivated
function deactivate() {}
module.exports = {
activate,
deactivate
}