@@ -1,17 +1,17 @@
|
||||
import { render } from '@react-email/components';
|
||||
import { copyFile, mkdir, writeFile } from 'node:fs/promises';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import * as React from 'react';
|
||||
import { render } from "@react-email/components";
|
||||
import { copyFile, mkdir, writeFile } from "node:fs/promises";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import * as React from "react";
|
||||
|
||||
import ConfirmEmail from '../src/ConfirmEmail';
|
||||
import DocumentExport from '../src/DocumentExport';
|
||||
import DocumentSigning from '../src/DocumentSigning';
|
||||
import FrameworkExport from '../src/FrameworkExport';
|
||||
import Invitation from '../src/Invitation';
|
||||
import PasswordReset from '../src/PasswordReset';
|
||||
import TrustCenterAccess from '../src/TrustCenterAccess';
|
||||
import TrustCenterDocumentAccessRejected from '../src/TrustCenterDocumentAccessRejected';
|
||||
import ConfirmEmail from "../src/ConfirmEmail";
|
||||
import DocumentExport from "../src/DocumentExport";
|
||||
import DocumentSigning from "../src/DocumentSigning";
|
||||
import FrameworkExport from "../src/FrameworkExport";
|
||||
import Invitation from "../src/Invitation";
|
||||
import PasswordReset from "../src/PasswordReset";
|
||||
import TrustCenterAccess from "../src/TrustCenterAccess";
|
||||
import TrustCenterDocumentAccessRejected from "../src/TrustCenterDocumentAccessRejected";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
@@ -23,42 +23,46 @@ type TemplateConfig = {
|
||||
|
||||
const templates: TemplateConfig[] = [
|
||||
{
|
||||
name: 'confirm-email',
|
||||
render: () => ConfirmEmail()
|
||||
name: "confirm-email",
|
||||
render: () => ConfirmEmail(),
|
||||
},
|
||||
{
|
||||
name: 'password-reset',
|
||||
render: () => PasswordReset()
|
||||
name: "password-reset",
|
||||
render: () => PasswordReset(),
|
||||
},
|
||||
{
|
||||
name: 'invitation',
|
||||
render: () => Invitation()
|
||||
name: "invitation",
|
||||
render: () => Invitation(),
|
||||
},
|
||||
{
|
||||
name: 'document-signing',
|
||||
render: () => DocumentSigning()
|
||||
name: "document-signing",
|
||||
render: () => DocumentSigning(),
|
||||
},
|
||||
{
|
||||
name: 'document-export',
|
||||
render: () => DocumentExport()
|
||||
name: "document-export",
|
||||
render: () => DocumentExport(),
|
||||
},
|
||||
{
|
||||
name: 'framework-export',
|
||||
render: () => FrameworkExport()
|
||||
name: "framework-export",
|
||||
render: () => FrameworkExport(),
|
||||
},
|
||||
{
|
||||
name: 'trust-center-access',
|
||||
render: () => TrustCenterAccess()
|
||||
name: "trust-center-access",
|
||||
render: () => TrustCenterAccess(),
|
||||
},
|
||||
{
|
||||
name: 'trust-center-document-access-rejected',
|
||||
render: () => TrustCenterDocumentAccessRejected()
|
||||
name: "trust-center-document-access-rejected",
|
||||
render: () => TrustCenterDocumentAccessRejected(),
|
||||
},
|
||||
{
|
||||
name: "magic-link",
|
||||
render: () => TrustCenterAccess(),
|
||||
},
|
||||
];
|
||||
|
||||
async function build() {
|
||||
const outputDir = join(__dirname, '..', 'dist');
|
||||
const templatesDir = join(__dirname, '..', 'templates');
|
||||
const outputDir = join(__dirname, "..", "dist");
|
||||
const templatesDir = join(__dirname, "..", "templates");
|
||||
await mkdir(outputDir, { recursive: true });
|
||||
|
||||
for (const template of templates) {
|
||||
@@ -74,6 +78,6 @@ async function build() {
|
||||
}
|
||||
|
||||
build().catch((err) => {
|
||||
console.error('Failed to build email templates:', err);
|
||||
console.error("Failed to build email templates:", err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user