Skip to content

Commit

Permalink
browser support
Browse files Browse the repository at this point in the history
  • Loading branch information
serkonda7 committed Jul 12, 2024
1 parent feb26ad commit 9e853ea
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ indent_size = 4
indent_style = space
indent_size = 3

[*.{yml,yaml-tmlanguage}]
[*.{json,yml,yaml-tmlanguage}]
indent_style = space
indent_size = 2
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dist/
*.vsix

# editor files
.vscode/
*.code-workspace

# other
Expand Down
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Web Extension in VS Code",
"type": "pwa-extensionHost",
"debugWebWorkerHost": true,
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionDevelopmentKind=web"
],
"outFiles": [
"${workspaceFolder}/src/*.js"
]
}
]
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog
## 0.11.0
_unreleased_
- Enable _vscode.dev_ support
- Replace Bait with JS
- Update dependencies

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"workspaceContains:**/*.{docm,xlsm,pptm,xlam,ppam}"
],
"main": "./src/main.js",
"browser": "./src/main.js",
"capabilities": {
"untrustedWorkspaces": {
"supported": true
Expand Down
6 changes: 4 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2023-present Lukas Neubert <lukas.neubert@proton.me>
// SPDX-License-Identifier: MPL-2.0

import * as vscode from 'vscode'
const vscode = require('vscode')

export function activate(context) {
function activate(context) {
vscode.commands.executeCommand("setContext", "vba.ctx.docExts", [".docm", ".xlsm", ".pptm", ".xlam", ".ppam"])

context.subscriptions.push(vscode.commands.registerCommand("vba.extract_from_doc", extract_from_doc))
Expand All @@ -23,3 +23,5 @@ function write_to_doc() {
function show_notif_funding() {
vscode.window.showInformationMessage("This feature is not yet complete.\nPlease consider a donation to support it\'s development.")
}

module.exports = { activate }

0 comments on commit 9e853ea

Please sign in to comment.