2018-12-21 14:08:14 +08:00
|
|
|
/**
|
|
|
|
* build system
|
|
|
|
* @author yutent<yutent@doui.cc>
|
|
|
|
* @date 2018/12/20 10:46:07
|
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const vsc = require('vscode')
|
|
|
|
|
|
|
|
const BuildSystem = require('./build_system')
|
|
|
|
|
|
|
|
function activate(ctx) {
|
|
|
|
let conf = vsc.workspace.getConfiguration('BuildSystem')
|
|
|
|
|
|
|
|
BuildSystem.__init__(conf)
|
|
|
|
|
|
|
|
vsc.window.onDidCloseTerminal(() => {
|
2018-12-21 15:10:37 +08:00
|
|
|
// todo...
|
2018-12-21 14:08:14 +08:00
|
|
|
})
|
|
|
|
|
2019-01-04 20:16:06 +08:00
|
|
|
vsc.workspace.onDidChangeConfiguration(_ => {
|
|
|
|
let conf = vsc.workspace.getConfiguration('BuildSystem')
|
|
|
|
|
|
|
|
BuildSystem.__init__(conf)
|
|
|
|
})
|
|
|
|
|
2018-12-21 14:08:14 +08:00
|
|
|
const build = vsc.commands.registerCommand('BuildSystem.build', _ => {
|
|
|
|
BuildSystem.build()
|
|
|
|
})
|
|
|
|
|
|
|
|
const stop = vsc.commands.registerCommand('BuildSystem.stop', _ => {
|
|
|
|
BuildSystem.stop()
|
|
|
|
})
|
|
|
|
|
|
|
|
ctx.subscriptions.push(build)
|
|
|
|
ctx.subscriptions.push(stop)
|
|
|
|
}
|
|
|
|
|
|
|
|
function deactivate() {}
|
|
|
|
|
|
|
|
exports.activate = activate
|
|
|
|
exports.deactivate = deactivate
|