Add linting steps and improve testing steps

This commit is contained in:
Asher
2020-02-04 15:00:44 -06:00
parent b29346ecdf
commit b30aefcfb1
7 changed files with 175 additions and 87 deletions

View File

@ -49,7 +49,7 @@ const main = async (args: Args = {}): Promise<void> => {
new VscodeHttpProvider([], { base: "/vscode-embed", auth, password })
)
ipcMain.onDispose(() => httpServer.dispose())
ipcMain().onDispose(() => httpServer.dispose())
const serverAddress = await httpServer.listen()
logger.info(`Server listening on ${serverAddress}`)
@ -84,4 +84,18 @@ const main = async (args: Args = {}): Promise<void> => {
}
}
wrap(main)
// TODO: Implement CLI parser.
if (process.argv.includes("--version")) {
const version = require("../../package.json").version
if (process.argv.includes("--json")) {
console.log({
codeServer: version,
vscode: require("../../lib/vscode/package.json").version,
})
} else {
console.log(version)
}
process.exit(0)
} else {
wrap(main)
}