Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,19 @@ async function main() {
logLevel: 'info',
});

const contexts = [extensionCtx, agentCtx, interactiveRendererCtx, webviewCtx];
if (watch) {
await Promise.all([
extensionCtx.watch(),
agentCtx.watch(),
interactiveRendererCtx.watch(),
webviewCtx.watch()
]);
await Promise.all(contexts.map(context => context.watch()));
console.log('Watching for changes...');
} else {
await extensionCtx.rebuild();
await agentCtx.rebuild();
await interactiveRendererCtx.rebuild();
await webviewCtx.rebuild();
await extensionCtx.dispose();
await agentCtx.dispose();
await interactiveRendererCtx.dispose();
await webviewCtx.dispose();
try {
const results = await Promise.all(contexts.map(context => context.rebuild()));
if (results.some(result => result.warnings.length > 0)) {
throw new Error('Build failed because esbuild reported warnings.');
}
} finally {
await Promise.all(contexts.map(context => context.dispose()));
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/helpViewer/helpPreviewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path';
import * as fs from 'fs';
import * as vscode from 'vscode';
import * as rHelp from './index';
import * as ejs from 'ejs';
import ejs from 'ejs';
import { isDirSafe, isFileSafe, readFileSyncSafe, config, spawnAsync } from '../util';
import { Topic, TopicType } from './packages';

Expand Down
2 changes: 1 addition & 1 deletion src/plotViewer/httpgdViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HttpgdClient, HttpgdIdResponse, HttpgdPlotId, HttpgdRendererId } from '
import { HttpgdPlot, IHttpgdViewer, HttpgdViewerOptions } from './httpgdTypes';
import * as path from 'path';
import * as fs from 'fs';
import * as ejs from 'ejs';
import ejs from 'ejs';

import { asViewColumn, config, setContext, UriIcon, makeWebviewCommandUriString } from '../util';
import { extensionContext } from '../extension';
Expand Down
Loading