Skip to content

Commit abf7b05

Browse files
committed
do not autobuild webui on preview
1 parent f6f9e38 commit abf7b05

File tree

5 files changed

+114
-56
lines changed

5 files changed

+114
-56
lines changed

src/command/preview/preview.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ import {
8484
} from "../../core/platform.ts";
8585
import { isJupyterNotebook } from "../../core/jupyter/jupyter.ts";
8686
import { watchForFileChanges } from "../../core/watch.ts";
87-
import {
88-
previewEnsureResources,
89-
previewMonitorResources,
90-
} from "../../core/quarto.ts";
87+
import { previewMonitorResources } from "../../core/quarto.ts";
9188
import { exitWithCleanup } from "../../core/cleanup.ts";
9289
import {
9390
extensionFilesFromDirs,
@@ -200,9 +197,6 @@ export async function preview(
200197
// const listener = Deno.listen({ port: options.port!, hostname: options.host });
201198
const stopServer = () => ac.abort();
202199

203-
// ensure resources
204-
previewEnsureResources(stopServer);
205-
206200
// create client reloader
207201
const reloader = httpDevServer(
208202
options.timeout!,

src/core/previewjs.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/core/quarto.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { exitWithCleanup } from "./cleanup.ts";
1414
import { onActiveProfileChanged } from "../project/project-profile.ts";
1515
import { onDotenvChanged } from "../quarto-core/dotenv.ts";
1616
import { normalizePath, safeExistsSync } from "./path.ts";
17-
import { buildQuartoPreviewJs } from "./previewjs.ts";
1817
import { isWindows } from "../deno_ral/platform.ts";
1918

2019
export const kLocalDevelopment = "99.9.9";
@@ -78,12 +77,6 @@ export const quartoConfig = {
7877
},
7978
};
8079

81-
export function previewEnsureResources(cleanup?: VoidFunction) {
82-
if (quartoConfig.isDebug()) {
83-
buildPreviewJs(quartoSrcDir(), cleanup);
84-
}
85-
}
86-
8780
export function previewMonitorResources(cleanup?: VoidFunction) {
8881
// active profile changed
8982
onActiveProfileChanged(() => {
@@ -129,10 +122,3 @@ function terminatePreview(reason: string, cleanup?: VoidFunction) {
129122
function quartoSrcDir() {
130123
return normalizePath(join(quartoConfig.binPath(), "../../../src"));
131124
}
132-
133-
function buildPreviewJs(srcDir: string, cleanup?: VoidFunction) {
134-
const output = buildQuartoPreviewJs(srcDir);
135-
if (!output.success) {
136-
terminatePreview("Error building quarto-preview.js", cleanup);
137-
}
138-
}

src/project/serve/serve.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ import { removePandocToArg } from "../../command/render/flags.ts";
104104
import { isRStudioServer, isServerSession } from "../../core/platform.ts";
105105
import { ServeRenderManager } from "./render.ts";
106106
import { projectScratchPath } from "../project-scratch.ts";
107-
import {
108-
previewEnsureResources,
109-
previewMonitorResources,
110-
} from "../../core/quarto.ts";
107+
import { previewMonitorResources } from "../../core/quarto.ts";
111108
import { exitWithCleanup, onCleanup } from "../../core/cleanup.ts";
112109
import { projectExtensionDirs } from "../../extension/extension.ts";
113110
import { findOpenPort } from "../../core/port.ts";
@@ -211,7 +208,6 @@ export async function serveProject(
211208
acquirePreviewLock(project);
212209

213210
// monitor the src dir
214-
previewEnsureResources();
215211
previewMonitorResources();
216212

217213
// clear the project index

0 commit comments

Comments
 (0)