initx-common README
为所有插件提供通用的 API 和 command.
activate event
onStartupFinished: 此时激活的时候,ide-server 确保是已经由 bff 层正确写入了运行时配置
how to use
API
Copy src/initx-common.d.ts to your extension's sources;
Include initx-common.d.ts in your extension's compilation.
Get a hold of the API with the following snippet:
const ext = vscode.extensions.getExtension<InitXCommonApi>('t-codespaces.initx-common').exports;
const config = ieExtension.ideRuntimeConfig;
execute command
const config: InitXCommonApi = await vscode.commands.executeCommand('initx.common.public.getRuntimeConfig');
publish
to open-vsx
vsce package
npx ovsx publish -p
to vscode
vsce publish
| |