({
dir: emailsDirRelativePath,
port,
clients,
}: Args)
| 8 | } |
| 9 | |
| 10 | export 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 | }; |
nothing calls this directly
no test coverage detected