MCPcopy
hub / github.com/freshframework/fresh / prepareDevServer

Function prepareDevServer

packages/plugin-vite/tests/test_utils.ts:52–74  ·  view source on GitHub ↗
(fixtureDir: string)

Source from the content-addressed store, hash-verified

50}
51
52export async function prepareDevServer(fixtureDir: string) {
53 const tmp = await withTmpDir({
54 dir: path.join(import.meta.dirname!, ".."),
55 prefix: "tmp_vite_",
56 });
57
58 await copyDir(fixtureDir, tmp.dir);
59
60 await Deno.writeTextFile(
61 path.join(tmp.dir, "vite.config.ts"),
62 `import { defineConfig } from "vite";
63import { fresh } from "@fresh/plugin-vite";
64
65export default defineConfig({
66 plugins: [
67 fresh(),
68 ],
69});
70`,
71 );
72
73 return tmp;
74}
75
76export async function launchDevServer(
77 dir: string,

Callers 2

dev_server_test.tsFile · 0.90
withDevServerFunction · 0.85

Calls 2

withTmpDirFunction · 0.90
copyDirFunction · 0.85

Tested by

no test coverage detected