🚀 Welcome to your new awesome project!
This project has been created using webpack scaffold, you can now run
npm run compile
to bundle your application
npm run start
to start your application
插件项目结构
src 目录下为主项目目录
extension.ts 为插件入口文件,暴露三个属性
API List
添加右侧控制栏
const addControls = Impl.addControl({
componentFunc: controls,
name: 'Deploy & Interaction',
iconName: 'GroupObject',
})
ctx.subscriptions.push(addControls)
设置欢迎页
const setWelcomePage = Impl.setWelcomePage({
componentFunc: welcomePage,
name: 'welcomePage',
iconName: 'GroupObject',
})
ctx.subscriptions.push(setWelcomePage)
注册命令
const setCommand = Impl.registerCommand({
id: 'commandId',
name: 'command',
callback: <T>(data?: T) => void,
})
ctx.subscriptions.push(setCommand)
注册方法
const registerFunction = Impl.registerFunction({
name: 'functionName',
function: <T>(data?: T) => void,
})
ctx.subscriptions.push(registerFunction)