AutoCommit/src/extension.ts

29 lines
845 B
TypeScript
Raw Normal View History

2019-12-26 17:47:37 +08:00
/*
* Author : OBKoro1
* Date : 2019-12-25 15:15:42
* LastEditors : OBKoro1
2020-12-10 20:02:10 +08:00
* LastEditTime : 2020-12-10 16:36:03
* FilePath : \autoCommit\src\extension.ts
2019-12-26 17:47:37 +08:00
* Description : 自动commit插件
* https://github.com/OBKoro1
*/
import * as vscode from 'vscode';
2020-12-10 20:02:10 +08:00
import ExtensionLogic from './models/index';
import { setExtensionContext } from './util/vscodeUtil';
2019-12-26 17:47:37 +08:00
// 扩展激活 默认运行
export function activate(context: vscode.ExtensionContext) {
2020-12-10 20:02:10 +08:00
setExtensionContext(context);
const autoCommit = vscode.commands.registerCommand('extension.autoCommit', () => {
const extensionLogic = new ExtensionLogic(context);
extensionLogic.init();
});
2019-12-26 17:47:37 +08:00
// 当插件关闭时被清理的可清理列表
2020-12-10 20:02:10 +08:00
context.subscriptions.push(autoCommit);
2019-12-26 17:47:37 +08:00
}
// 扩展被禁用 调用
export function deactivate() {}