MCPcopy Index your code
hub / github.com/resend/react-email / dev

Function dev

packages/react-email/src/cli/commands/dev.ts:10–33  ·  view source on GitHub ↗
({
  dir: emailsDirRelativePath,
  port,
  clients,
}: Args)

Source from the content-addressed store, hash-verified

8}
9
10export const dev = async ({
11 dir: emailsDirRelativePath,
12 port,
13 clients,
14}: Args) => {
15 try {
16 if (!fs.existsSync(emailsDirRelativePath)) {
17 console.error(`Missing ${emailsDirRelativePath} folder`);
18 process.exit(1);
19 }
20
21 const devServer = await startDevServer(
22 emailsDirRelativePath,
23 emailsDirRelativePath, // defaults to ./emails/static for the static files that are served to the preview
24 Number.parseInt(port, 10),
25 clients,
26 );
27
28 await setupHotreloading(devServer, emailsDirRelativePath);
29 } catch (error) {
30 console.log(error);
31 process.exit(1);
32 }
33};

Callers

nothing calls this directly

Calls 4

startDevServerFunction · 0.85
setupHotreloadingFunction · 0.85
errorMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected