react-email 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_preview/components.js +1 -1
- package/dist/_preview/pages.js +1 -1
- package/package.json +1 -1
- package/preview/src/components/layout.tsx +1 -1
- package/preview/src/pages/preview/[slug].tsx +9 -2
- package/source/_preview/components.ts +1 -1
- package/source/_preview/pages.ts +1 -1
- package/dist/_preview/package.d.ts +0 -36
- package/dist/_preview/package.js +0 -39
- package/dist/utils/copy-files.d.ts +0 -1
- package/dist/utils/copy-files.js +0 -110
|
@@ -20,7 +20,7 @@ exports.components = [
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
title: 'layout.tsx',
|
|
23
|
-
content: "import * as React from 'react';\nimport { Topbar } from './topbar';\nimport { Sidebar } from './sidebar';\n\ntype LayoutElement = React.ElementRef<'div'>;\ntype RootProps = React.ComponentPropsWithoutRef<'div'>;\n\ninterface LayoutProps extends RootProps {\n navItems: string[];\n viewMode?: string;\n setViewMode?: (viewMode: string) => void;\n}\n\nexport const Layout = React.forwardRef<LayoutElement, Readonly<LayoutProps>>(\n (\n { className, title, navItems, children, viewMode, setViewMode, ...props },\n forwardedRef,\n ) => {\n return (\n <>\n <div className=\"flex justify-between h-screen\">\n <Sidebar navItems={navItems} />\n <main className=\"w-
|
|
23
|
+
content: "import * as React from 'react';\nimport { Topbar } from './topbar';\nimport { Sidebar } from './sidebar';\n\ntype LayoutElement = React.ElementRef<'div'>;\ntype RootProps = React.ComponentPropsWithoutRef<'div'>;\n\ninterface LayoutProps extends RootProps {\n navItems: string[];\n viewMode?: string;\n setViewMode?: (viewMode: string) => void;\n}\n\nexport const Layout = React.forwardRef<LayoutElement, Readonly<LayoutProps>>(\n (\n { className, title, navItems, children, viewMode, setViewMode, ...props },\n forwardedRef,\n ) => {\n return (\n <>\n <div className=\"flex justify-between h-screen\">\n <Sidebar navItems={navItems} />\n <main className=\"w-[calc(100%_-_275px)] bg-slate-2\">\n {title && (\n <Topbar\n title={title}\n viewMode={viewMode}\n setViewMode={setViewMode}\n />\n )}\n <div className=\"relative h-[calc(100vh_-_70px)] overflow-auto\">\n <div className=\"mx-auto\">{children}</div>\n </div>\n </main>\n </div>\n </>\n );\n },\n);\n\nLayout.displayName = 'Layout';\n",
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
title: 'logo.tsx',
|
package/dist/_preview/pages.js
CHANGED
|
@@ -17,6 +17,6 @@ exports.pages = [
|
|
|
17
17
|
{
|
|
18
18
|
dir: 'preview',
|
|
19
19
|
title: '[slug].tsx',
|
|
20
|
-
content: "import { promises as fs } from 'fs';\nimport path from 'path';\nimport { render } from '@react-email/render';\nimport { GetStaticPaths } from 'next';\nimport { Layout } from '../../components/layout';\nimport * as React from 'react';\nimport { Code } from '../../components';\nimport Head from 'next/head';\n\ninterface PreviewProps {}\n\nexport const CONTENT_DIR = 'emails';\n\nconst getEmails = async () => {\n const emailsDirectory = path.join(process.cwd(), CONTENT_DIR);\n const filenames = await fs.readdir(emailsDirectory);\n const emails = filenames.map((file) => file.replace('.tsx', ''));\n\n return emails;\n};\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n const emails = await getEmails();\n\n const paths = emails.map((email) => {\n return { params: { slug: email } };\n });\n return { paths, fallback: true };\n};\n\nexport async function getStaticProps({ params }) {\n try {\n const emails = await getEmails();\n const Email = (await import(`../../../emails/${params.slug}`)).default;\n const markup = render(<Email />, { pretty: true });\n\n return emails\n ? { props: { navItems: emails, slug: params.slug, markup } }\n : { notFound: true };\n } catch (error) {\n console.error(error);\n return { notFound: true };\n }\n}\n\nconst Preview: React.FC<Readonly<PreviewProps>> = ({\n navItems,\n markup,\n slug,\n}: any) => {\n const [viewMode, setViewMode] = React.useState('desktop');\n const title = `${slug} — React Email`;\n\n return (\n <Layout\n navItems={navItems}\n title={slug}\n viewMode={viewMode}\n setViewMode={setViewMode}\n >\n <Head>\n <title>{title}</title>\n </Head>\n {viewMode === 'desktop' ? (\n <iframe\n srcDoc={markup}\n frameBorder=\"0\"\n className=\"w-full h-[calc(100vh_-_70px)]\"\n />\n ) : (\n <div className=\"
|
|
20
|
+
content: "import { promises as fs } from 'fs';\nimport path from 'path';\nimport { render } from '@react-email/render';\nimport { GetStaticPaths } from 'next';\nimport { Layout } from '../../components/layout';\nimport * as React from 'react';\nimport { Code } from '../../components';\nimport Head from 'next/head';\n\ninterface PreviewProps {}\n\nexport const CONTENT_DIR = 'emails';\n\nconst getEmails = async () => {\n const emailsDirectory = path.join(process.cwd(), CONTENT_DIR);\n const filenames = await fs.readdir(emailsDirectory);\n const emails = filenames.map((file) => file.replace('.tsx', ''));\n\n return emails;\n};\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n const emails = await getEmails();\n\n const paths = emails.map((email) => {\n return { params: { slug: email } };\n });\n return { paths, fallback: true };\n};\n\nexport async function getStaticProps({ params }) {\n try {\n const emails = await getEmails();\n const Email = (await import(`../../../emails/${params.slug}`)).default;\n const markup = render(<Email />, { pretty: true });\n\n const path = `${process.cwd()}/${CONTENT_DIR}/${params.slug}`;\n const reactMarkup = await fs.readFile(`${path}.tsx`, {\n encoding: 'utf-8',\n });\n\n return emails\n ? { props: { navItems: emails, slug: params.slug, markup, reactMarkup } }\n : { notFound: true };\n } catch (error) {\n console.error(error);\n return { notFound: true };\n }\n}\n\nconst Preview: React.FC<Readonly<PreviewProps>> = ({\n navItems,\n markup,\n reactMarkup,\n slug,\n}: any) => {\n const [viewMode, setViewMode] = React.useState('desktop');\n const title = `${slug} — React Email`;\n\n return (\n <Layout\n navItems={navItems}\n title={slug}\n viewMode={viewMode}\n setViewMode={setViewMode}\n >\n <Head>\n <title>{title}</title>\n </Head>\n {viewMode === 'desktop' ? (\n <iframe\n srcDoc={markup}\n frameBorder=\"0\"\n className=\"w-full h-[calc(100vh_-_70px)]\"\n />\n ) : (\n <div className=\"flex gap-6 mx-auto p-6\">\n <Code>{reactMarkup}</Code>\n <Code>{markup}</Code>\n </div>\n )}\n </Layout>\n );\n};\n\nexport default Preview;\n",
|
|
21
21
|
},
|
|
22
22
|
];
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@ export const Layout = React.forwardRef<LayoutElement, Readonly<LayoutProps>>(
|
|
|
20
20
|
<>
|
|
21
21
|
<div className="flex justify-between h-screen">
|
|
22
22
|
<Sidebar navItems={navItems} />
|
|
23
|
-
<main className="w-
|
|
23
|
+
<main className="w-[calc(100%_-_275px)] bg-slate-2">
|
|
24
24
|
{title && (
|
|
25
25
|
<Topbar
|
|
26
26
|
title={title}
|
|
@@ -34,8 +34,13 @@ export async function getStaticProps({ params }) {
|
|
|
34
34
|
const Email = (await import(`../../../emails/${params.slug}`)).default;
|
|
35
35
|
const markup = render(<Email />, { pretty: true });
|
|
36
36
|
|
|
37
|
+
const path = `${process.cwd()}/${CONTENT_DIR}/${params.slug}`;
|
|
38
|
+
const reactMarkup = await fs.readFile(`${path}.tsx`, {
|
|
39
|
+
encoding: 'utf-8',
|
|
40
|
+
});
|
|
41
|
+
|
|
37
42
|
return emails
|
|
38
|
-
? { props: { navItems: emails, slug: params.slug, markup } }
|
|
43
|
+
? { props: { navItems: emails, slug: params.slug, markup, reactMarkup } }
|
|
39
44
|
: { notFound: true };
|
|
40
45
|
} catch (error) {
|
|
41
46
|
console.error(error);
|
|
@@ -46,6 +51,7 @@ export async function getStaticProps({ params }) {
|
|
|
46
51
|
const Preview: React.FC<Readonly<PreviewProps>> = ({
|
|
47
52
|
navItems,
|
|
48
53
|
markup,
|
|
54
|
+
reactMarkup,
|
|
49
55
|
slug,
|
|
50
56
|
}: any) => {
|
|
51
57
|
const [viewMode, setViewMode] = React.useState('desktop');
|
|
@@ -68,7 +74,8 @@ const Preview: React.FC<Readonly<PreviewProps>> = ({
|
|
|
68
74
|
className="w-full h-[calc(100vh_-_70px)]"
|
|
69
75
|
/>
|
|
70
76
|
) : (
|
|
71
|
-
<div className="
|
|
77
|
+
<div className="flex gap-6 mx-auto p-6">
|
|
78
|
+
<Code>{reactMarkup}</Code>
|
|
72
79
|
<Code>{markup}</Code>
|
|
73
80
|
</div>
|
|
74
81
|
)}
|
|
@@ -22,7 +22,7 @@ export const components = [
|
|
|
22
22
|
{
|
|
23
23
|
title: 'layout.tsx',
|
|
24
24
|
content:
|
|
25
|
-
"import * as React from 'react';\nimport { Topbar } from './topbar';\nimport { Sidebar } from './sidebar';\n\ntype LayoutElement = React.ElementRef<'div'>;\ntype RootProps = React.ComponentPropsWithoutRef<'div'>;\n\ninterface LayoutProps extends RootProps {\n navItems: string[];\n viewMode?: string;\n setViewMode?: (viewMode: string) => void;\n}\n\nexport const Layout = React.forwardRef<LayoutElement, Readonly<LayoutProps>>(\n (\n { className, title, navItems, children, viewMode, setViewMode, ...props },\n forwardedRef,\n ) => {\n return (\n <>\n <div className=\"flex justify-between h-screen\">\n <Sidebar navItems={navItems} />\n <main className=\"w-
|
|
25
|
+
"import * as React from 'react';\nimport { Topbar } from './topbar';\nimport { Sidebar } from './sidebar';\n\ntype LayoutElement = React.ElementRef<'div'>;\ntype RootProps = React.ComponentPropsWithoutRef<'div'>;\n\ninterface LayoutProps extends RootProps {\n navItems: string[];\n viewMode?: string;\n setViewMode?: (viewMode: string) => void;\n}\n\nexport const Layout = React.forwardRef<LayoutElement, Readonly<LayoutProps>>(\n (\n { className, title, navItems, children, viewMode, setViewMode, ...props },\n forwardedRef,\n ) => {\n return (\n <>\n <div className=\"flex justify-between h-screen\">\n <Sidebar navItems={navItems} />\n <main className=\"w-[calc(100%_-_275px)] bg-slate-2\">\n {title && (\n <Topbar\n title={title}\n viewMode={viewMode}\n setViewMode={setViewMode}\n />\n )}\n <div className=\"relative h-[calc(100vh_-_70px)] overflow-auto\">\n <div className=\"mx-auto\">{children}</div>\n </div>\n </main>\n </div>\n </>\n );\n },\n);\n\nLayout.displayName = 'Layout';\n",
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
title: 'logo.tsx',
|
package/source/_preview/pages.ts
CHANGED
|
@@ -18,6 +18,6 @@ export const pages = [
|
|
|
18
18
|
dir: 'preview',
|
|
19
19
|
title: '[slug].tsx',
|
|
20
20
|
content:
|
|
21
|
-
"import { promises as fs } from 'fs';\nimport path from 'path';\nimport { render } from '@react-email/render';\nimport { GetStaticPaths } from 'next';\nimport { Layout } from '../../components/layout';\nimport * as React from 'react';\nimport { Code } from '../../components';\nimport Head from 'next/head';\n\ninterface PreviewProps {}\n\nexport const CONTENT_DIR = 'emails';\n\nconst getEmails = async () => {\n const emailsDirectory = path.join(process.cwd(), CONTENT_DIR);\n const filenames = await fs.readdir(emailsDirectory);\n const emails = filenames.map((file) => file.replace('.tsx', ''));\n\n return emails;\n};\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n const emails = await getEmails();\n\n const paths = emails.map((email) => {\n return { params: { slug: email } };\n });\n return { paths, fallback: true };\n};\n\nexport async function getStaticProps({ params }) {\n try {\n const emails = await getEmails();\n const Email = (await import(`../../../emails/${params.slug}`)).default;\n const markup = render(<Email />, { pretty: true });\n\n return emails\n ? { props: { navItems: emails, slug: params.slug, markup } }\n : { notFound: true };\n } catch (error) {\n console.error(error);\n return { notFound: true };\n }\n}\n\nconst Preview: React.FC<Readonly<PreviewProps>> = ({\n navItems,\n markup,\n slug,\n}: any) => {\n const [viewMode, setViewMode] = React.useState('desktop');\n const title = `${slug} — React Email`;\n\n return (\n <Layout\n navItems={navItems}\n title={slug}\n viewMode={viewMode}\n setViewMode={setViewMode}\n >\n <Head>\n <title>{title}</title>\n </Head>\n {viewMode === 'desktop' ? (\n <iframe\n srcDoc={markup}\n frameBorder=\"0\"\n className=\"w-full h-[calc(100vh_-_70px)]\"\n />\n ) : (\n <div className=\"
|
|
21
|
+
"import { promises as fs } from 'fs';\nimport path from 'path';\nimport { render } from '@react-email/render';\nimport { GetStaticPaths } from 'next';\nimport { Layout } from '../../components/layout';\nimport * as React from 'react';\nimport { Code } from '../../components';\nimport Head from 'next/head';\n\ninterface PreviewProps {}\n\nexport const CONTENT_DIR = 'emails';\n\nconst getEmails = async () => {\n const emailsDirectory = path.join(process.cwd(), CONTENT_DIR);\n const filenames = await fs.readdir(emailsDirectory);\n const emails = filenames.map((file) => file.replace('.tsx', ''));\n\n return emails;\n};\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n const emails = await getEmails();\n\n const paths = emails.map((email) => {\n return { params: { slug: email } };\n });\n return { paths, fallback: true };\n};\n\nexport async function getStaticProps({ params }) {\n try {\n const emails = await getEmails();\n const Email = (await import(`../../../emails/${params.slug}`)).default;\n const markup = render(<Email />, { pretty: true });\n\n const path = `${process.cwd()}/${CONTENT_DIR}/${params.slug}`;\n const reactMarkup = await fs.readFile(`${path}.tsx`, {\n encoding: 'utf-8',\n });\n\n return emails\n ? { props: { navItems: emails, slug: params.slug, markup, reactMarkup } }\n : { notFound: true };\n } catch (error) {\n console.error(error);\n return { notFound: true };\n }\n}\n\nconst Preview: React.FC<Readonly<PreviewProps>> = ({\n navItems,\n markup,\n reactMarkup,\n slug,\n}: any) => {\n const [viewMode, setViewMode] = React.useState('desktop');\n const title = `${slug} — React Email`;\n\n return (\n <Layout\n navItems={navItems}\n title={slug}\n viewMode={viewMode}\n setViewMode={setViewMode}\n >\n <Head>\n <title>{title}</title>\n </Head>\n {viewMode === 'desktop' ? (\n <iframe\n srcDoc={markup}\n frameBorder=\"0\"\n className=\"w-full h-[calc(100vh_-_70px)]\"\n />\n ) : (\n <div className=\"flex gap-6 mx-auto p-6\">\n <Code>{reactMarkup}</Code>\n <Code>{markup}</Code>\n </div>\n )}\n </Layout>\n );\n};\n\nexport default Preview;\n",
|
|
22
22
|
},
|
|
23
23
|
];
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare const previewPkg: {
|
|
2
|
-
name: string;
|
|
3
|
-
version: string;
|
|
4
|
-
description: string;
|
|
5
|
-
license: string;
|
|
6
|
-
scripts: {
|
|
7
|
-
'dev': string;
|
|
8
|
-
'build': string;
|
|
9
|
-
'start': string;
|
|
10
|
-
'lint': string;
|
|
11
|
-
'format:check': string;
|
|
12
|
-
'format': string;
|
|
13
|
-
};
|
|
14
|
-
dependencies: {
|
|
15
|
-
'@next/font': string;
|
|
16
|
-
'@radix-ui/colors': string;
|
|
17
|
-
'@radix-ui/react-collapsible': string;
|
|
18
|
-
'@radix-ui/react-slot': string;
|
|
19
|
-
'@radix-ui/react-toggle-group': string;
|
|
20
|
-
'classnames': string;
|
|
21
|
-
'next': string;
|
|
22
|
-
'prism-react-renderer': string;
|
|
23
|
-
'react': string;
|
|
24
|
-
'react-dom': string;
|
|
25
|
-
};
|
|
26
|
-
devDependencies: {
|
|
27
|
-
'@types/classnames': string;
|
|
28
|
-
'@types/node': string;
|
|
29
|
-
'@types/react': string;
|
|
30
|
-
'@types/react-dom': string;
|
|
31
|
-
'autoprefixer': string;
|
|
32
|
-
'postcss': string;
|
|
33
|
-
'tailwindcss': string;
|
|
34
|
-
'typescript': string;
|
|
35
|
-
};
|
|
36
|
-
};
|
package/dist/_preview/package.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
-
exports.previewPkg = void 0;
|
|
4
|
-
exports.previewPkg = {
|
|
5
|
-
name: 'react-email-preview',
|
|
6
|
-
version: '0.0.1',
|
|
7
|
-
description: 'The React Email preview application',
|
|
8
|
-
license: 'MIT',
|
|
9
|
-
scripts: {
|
|
10
|
-
'dev': 'next dev',
|
|
11
|
-
'build': 'next build',
|
|
12
|
-
'start': 'next start',
|
|
13
|
-
'lint': 'next lint',
|
|
14
|
-
'format:check': 'prettier --check "**/*.{ts,tsx,md}"',
|
|
15
|
-
'format': 'prettier --write "**/*.{ts,tsx,md}"',
|
|
16
|
-
},
|
|
17
|
-
dependencies: {
|
|
18
|
-
'@next/font': '13.0.4',
|
|
19
|
-
'@radix-ui/colors': '0.1.8',
|
|
20
|
-
'@radix-ui/react-collapsible': '1.0.1',
|
|
21
|
-
'@radix-ui/react-slot': '1.0.1',
|
|
22
|
-
'@radix-ui/react-toggle-group': '1.0.1',
|
|
23
|
-
'classnames': '2.3.2',
|
|
24
|
-
'next': '13.0.4',
|
|
25
|
-
'prism-react-renderer': '1.3.5',
|
|
26
|
-
'react': '18.2.0',
|
|
27
|
-
'react-dom': '18.2.0',
|
|
28
|
-
},
|
|
29
|
-
devDependencies: {
|
|
30
|
-
'@types/classnames': '2.3.1',
|
|
31
|
-
'@types/node': '18.11.9',
|
|
32
|
-
'@types/react': '18.0.25',
|
|
33
|
-
'@types/react-dom': '18.0.9',
|
|
34
|
-
'autoprefixer': '10.4.13',
|
|
35
|
-
'postcss': '8.4.19',
|
|
36
|
-
'tailwindcss': '3.2.4',
|
|
37
|
-
'typescript': '4.9.3',
|
|
38
|
-
},
|
|
39
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const copyFiles: () => Promise<void>;
|
package/dist/utils/copy-files.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var __importDefault =
|
|
3
|
-
(this && this.__importDefault) ||
|
|
4
|
-
function (mod) {
|
|
5
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
6
|
-
};
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
exports.copyFiles = void 0;
|
|
9
|
-
const path_1 = __importDefault(require('path'));
|
|
10
|
-
const cpy_1 = __importDefault(require('cpy'));
|
|
11
|
-
const contants_1 = require('./contants');
|
|
12
|
-
const copyFiles = async () => {
|
|
13
|
-
try {
|
|
14
|
-
await (0, cpy_1.default)(
|
|
15
|
-
path_1.default.join(
|
|
16
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
17
|
-
'src',
|
|
18
|
-
'pages',
|
|
19
|
-
'preview',
|
|
20
|
-
),
|
|
21
|
-
path_1.default.join(contants_1.DOT_EMAIL_DEV, 'src', 'pages', 'preview'),
|
|
22
|
-
);
|
|
23
|
-
await (0, cpy_1.default)(
|
|
24
|
-
path_1.default.join(
|
|
25
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
26
|
-
'src',
|
|
27
|
-
'pages',
|
|
28
|
-
'_app.tsx',
|
|
29
|
-
),
|
|
30
|
-
path_1.default.join(contants_1.DOT_EMAIL_DEV, 'src', 'pages'),
|
|
31
|
-
);
|
|
32
|
-
await (0, cpy_1.default)(
|
|
33
|
-
path_1.default.join(
|
|
34
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
35
|
-
'src',
|
|
36
|
-
'pages',
|
|
37
|
-
'_document.tsx',
|
|
38
|
-
),
|
|
39
|
-
path_1.default.join(contants_1.DOT_EMAIL_DEV, 'src', 'pages'),
|
|
40
|
-
);
|
|
41
|
-
await (0, cpy_1.default)(
|
|
42
|
-
path_1.default.join(
|
|
43
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
44
|
-
'src',
|
|
45
|
-
'pages',
|
|
46
|
-
'index.tsx',
|
|
47
|
-
),
|
|
48
|
-
path_1.default.join(contants_1.DOT_EMAIL_DEV, 'src', 'pages'),
|
|
49
|
-
);
|
|
50
|
-
await (0, cpy_1.default)(
|
|
51
|
-
path_1.default.join(
|
|
52
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
53
|
-
'src',
|
|
54
|
-
'styles',
|
|
55
|
-
),
|
|
56
|
-
path_1.default.join(contants_1.DOT_EMAIL_DEV, 'src', 'styles'),
|
|
57
|
-
);
|
|
58
|
-
await (0, cpy_1.default)(
|
|
59
|
-
path_1.default.join(
|
|
60
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
61
|
-
'src',
|
|
62
|
-
'components',
|
|
63
|
-
),
|
|
64
|
-
path_1.default.join(contants_1.DOT_EMAIL_DEV, 'src', 'components'),
|
|
65
|
-
);
|
|
66
|
-
await (0, cpy_1.default)(
|
|
67
|
-
path_1.default.join(contants_1.NODE_MODULES_PREVIEW_PATH, 'src', 'utils'),
|
|
68
|
-
path_1.default.join(contants_1.DOT_EMAIL_DEV, 'src', 'utils'),
|
|
69
|
-
);
|
|
70
|
-
await (0, cpy_1.default)(
|
|
71
|
-
path_1.default.join(
|
|
72
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
73
|
-
'next-env.d.ts',
|
|
74
|
-
),
|
|
75
|
-
contants_1.DOT_EMAIL_DEV,
|
|
76
|
-
);
|
|
77
|
-
await (0, cpy_1.default)(
|
|
78
|
-
path_1.default.join(contants_1.NODE_MODULES_PREVIEW_PATH, 'package.json'),
|
|
79
|
-
contants_1.DOT_EMAIL_DEV,
|
|
80
|
-
);
|
|
81
|
-
await (0, cpy_1.default)(
|
|
82
|
-
path_1.default.join(
|
|
83
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
84
|
-
'postcss.config.js',
|
|
85
|
-
),
|
|
86
|
-
contants_1.DOT_EMAIL_DEV,
|
|
87
|
-
);
|
|
88
|
-
await (0, cpy_1.default)(
|
|
89
|
-
path_1.default.join(
|
|
90
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
91
|
-
'tailwind.config.js',
|
|
92
|
-
),
|
|
93
|
-
contants_1.DOT_EMAIL_DEV,
|
|
94
|
-
);
|
|
95
|
-
await (0, cpy_1.default)(
|
|
96
|
-
path_1.default.join(
|
|
97
|
-
contants_1.NODE_MODULES_PREVIEW_PATH,
|
|
98
|
-
'tsconfig.json',
|
|
99
|
-
),
|
|
100
|
-
contants_1.DOT_EMAIL_DEV,
|
|
101
|
-
);
|
|
102
|
-
await (0, cpy_1.default)(
|
|
103
|
-
contants_1.CLIENT_EMAILS_PATH,
|
|
104
|
-
contants_1.PACKAGE_EMAILS_PATH,
|
|
105
|
-
);
|
|
106
|
-
} catch (error) {
|
|
107
|
-
console.error({ error });
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
exports.copyFiles = copyFiles;
|