Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/packages/vscode/src/index.ts

40 lines
1.0 KiB
TypeScript
Raw Normal View History

2019-01-12 01:11:34 +01:00
import { field, logger, time } from "@coder/logger";
import { Client, IURI, setUriFactory } from "@coder/ide";
import { URI } from "vs/base/common/uri";
import "./firefox";
2019-01-12 01:21:31 +01:00
const load = (): Promise<void> => {
return new Promise((resolve, reject) => {
setUriFactory({
// TODO: not sure why this is an error.
// tslint:disable-next-line no-any
create: <URI>(uri: IURI): URI => URI.from(uri) as any,
file: (path: string): IURI => URI.file(path),
parse: (raw: string): IURI => URI.parse(raw),
});
const client = new Client({
mkDirs: [
"~/vscode/extensions",
"~/.config/User",
],
});
2019-01-12 01:11:34 +01:00
resolve();
2019-01-12 01:11:34 +01:00
2019-01-12 01:21:31 +01:00
// const importTime = time(1500);
// import(/* webpackPrefetch: true */ "./workbench").then((module) => {
// logger.info("Loaded workbench bundle", field("duration", importTime));
// const initTime = time(1500);
2019-01-12 01:11:34 +01:00
2019-01-12 01:21:31 +01:00
// return module.initialize(client).then(() => {
// logger.info("Initialized workbench", field("duration", initTime));
//
// });
// }).catch((error) => {
// });
});
};
2019-01-12 01:11:34 +01:00
2019-01-12 01:21:31 +01:00
export { load };