Skip to content

Commit b2f4228

Browse files
committed
fix(vscode): rename ext
1 parent 04ab298 commit b2f4228

18 files changed

Lines changed: 162 additions & 165 deletions

File tree

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
name: Release VS Code Extension
1+
# Auto-releases on push to main (@next channel)
2+
# For stable (@latest): cherry-pick commits to stable branch, then manually dispatch this workflow
3+
name: 📦 Release vscode-ext
24

35
on:
46
push:
57
branches: [main, stable]
68
paths:
7-
- 'apps/vscode-extension/**'
8-
- '!apps/vscode-extension/*.md'
9+
- 'apps/vscode-ext/**'
10+
- '!apps/vscode-ext/*.md'
911

1012
permissions:
1113
contents: write
@@ -40,11 +42,11 @@ jobs:
4042

4143
- name: Build
4244
run: pnpm run build
43-
working-directory: apps/vscode-extension
45+
working-directory: apps/vscode-ext
4446

4547
- name: Release
4648
run: pnpx semantic-release
47-
working-directory: apps/vscode-extension
49+
working-directory: apps/vscode-ext
4850
env:
4951
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
5052
VSCE_PAT: ${{ secrets.VSCE_PAT }}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ config.plugins.push([
3939
{
4040
teamKeys: ['SD'],
4141
addComment: true,
42-
packageName: 'vscode-extension',
42+
packageName: 'vscode-ext',
4343
commentTemplate: 'shipped in {package} {releaseLink} {channel}',
4444
},
4545
]);
@@ -49,7 +49,7 @@ config.plugins.push([
4949
{
5050
assets: [{ path: '*.vsix', label: 'VS Code Extension' }],
5151
successComment:
52-
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **vscode-extension** v${nextRelease.version}',
52+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **vscode-ext** v${nextRelease.version}',
5353
},
5454
]);
5555

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66
"type": "extensionHost",
77
"request": "launch",
88
"runtimeExecutable": "${execPath}",
9-
"args": [
10-
"--extensionDevelopmentPath=${workspaceFolder}"
11-
],
12-
"outFiles": [
13-
"${workspaceFolder}/dist/**/*.js"
14-
]
9+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
10+
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
1511
}
1612
]
17-
}
13+
}
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@superdoc-dev/vscode-extension",
2+
"name": "@superdoc-dev/vscode-ext",
33
"displayName": "SuperDoc for VS Code",
44
"description": "Open and edit Word documents (.docx) directly in VS Code using SuperDoc",
55
"version": "0.1.0",

apps/vscode-ext/src/extension.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import * as vscode from 'vscode';
2+
import { SuperDocEditorProvider } from './superdocEditorProvider';
3+
4+
function debug(message: string) {
5+
console.log('[SuperDoc - Activator]', message);
6+
}
7+
8+
export function activate(context: vscode.ExtensionContext) {
9+
try {
10+
debug('Beginning activation...');
11+
12+
// Register custom editor provider
13+
const provider = new SuperDocEditorProvider(context);
14+
const providerRegistration = vscode.window.registerCustomEditorProvider('superdoc.docxEditor', provider, {
15+
webviewOptions: {
16+
retainContextWhenHidden: true,
17+
},
18+
supportsMultipleEditorsPerDocument: false,
19+
});
20+
21+
// Register command to open with SuperDoc
22+
const openCommand = vscode.commands.registerCommand('superdoc.openWithSuperdoc', (uri: vscode.Uri) => {
23+
vscode.commands.executeCommand('vscode.openWith', uri, 'superdoc.docxEditor');
24+
});
25+
26+
context.subscriptions.push(providerRegistration, openCommand);
27+
debug('Registered extension');
28+
debug('Activation complete');
29+
vscode.window.showInformationMessage('SuperDoc extension activated.');
30+
} catch (error) {
31+
debug(`Activation error - ${error}`);
32+
vscode.window.showErrorMessage(`Failed to activate SuperDoc: ${error}`);
33+
}
34+
}
35+
36+
export function deactivate() {
37+
debug('Extension deactivated');
38+
}

0 commit comments

Comments
 (0)