Skip to content

Commit 3ae845c

Browse files
committed
wip: clean up for release
1 parent 7c75112 commit 3ae845c

12 files changed

Lines changed: 31 additions & 285 deletions

.changeset/fast-bobcats-battle.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"md-to-react-email": major
3+
---
4+
5+
### Rewrite
6+
7+
### Changes
8+
9+
- Added [`Marked`]() for markdown transformations
10+
- Removed `ParseMarkdownToReactEmail` function
11+
12+
### Fixes
13+
14+
- Fixed issue with parsing list
15+
- Fixed `parseCssInJsToInlineCss` issue with numerical values

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ Read the documentation [here](https://md2re.codeskills.dev/)
66

77
md-to-react-email is a lightweight utility for converting [Markdown](https://www.markdownguide.org/) into valid [React-email](https://react.email) templates. This tool simplifies the process of creating responsive and customizable email templates by leveraging the power of React and Markdown.
88

9+
**Note**: Starting from [v4](), `md-to-react-email` uses [`Marked`] for markdown transformation. see all changes [here]()
10+
911
### Support
1012

1113
The following markdown flavors are supported
1214

1315
- Offical markdown flavour
14-
- Github flavoured markdown
1516

1617
## Installation
1718

@@ -35,7 +36,6 @@ npm install md-to-react-email
3536

3637
- `camelToKebabCase`: converts strings from camelcase ['thisIsCamelCase'] to kebab case ['this-is-kebab-case']
3738
- `parseCssInJsToInlineCss`: converts css styles from css-in-js to inline css e.g fontSize: "18px" => font-size: 18px;
38-
- `parseMarkdownToReactEmail`: parses markdown to a valid react-email string that can be copied and pasted directly into your codebase
3939
- `parseMarkdownToReactEmailJSX`: parses markdown to valid react-email JSX for the client (i.e the browser)
4040

4141
### Components:
@@ -75,18 +75,6 @@ npm install md-to-react-email
7575

7676
```
7777

78-
- For code generation (copy and paste)
79-
80-
```
81-
import {parseMarkdownToReactEmail} from "md-to-react-email"
82-
83-
const markdown = `# Hello World`
84-
const parsedReactMail = parseMarkdownToReactEmail(markdown)
85-
86-
console.log(parsedReactMail) // `<Heading as="h1" style={...styles go here...}></Heading>`
87-
88-
```
89-
9078
## Components
9179

9280
md-to-react-email contains pre-defined react-email and html components for the email template structure and styling. You can modify these components to customize the look and feel of your email template.

pre-planning/BASE-STYLES.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

pre-planning/IDEAS.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

pre-planning/MATCHER-CASES.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

pre-planning/PROJECT-BREAKDOWN.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

pre-planning/PROJECT-OUTLINE.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

pre-planning/REPLACEMENT-CASES.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

pre-planning/TODOS.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
/**
22
* Types
33
*/
4-
export { StylesType } from "./types";
4+
export { StylesType, ParseMarkdownToReactEmailJSXProps } from "./types";
55

66
/**
77
* Utility Functions
88
*/
9-
export {
10-
parseMarkdownToReactEmailJSX,
11-
ParseMarkdownToReactEmailJSXProps,
12-
} from "./parseMarkdownToReactEmailJSX";
9+
export { parseMarkdownToReactEmailJSX } from "./parseMarkdownToReactEmailJSX";
1310

1411
/**
1512
* Components
1613
*/
1714
export { ReactEmailMarkdown } from "./components";
15+
16+
/**
17+
* String Utils
18+
*/
19+
export { camelToKebabCase, parseCssInJsToInlineCss } from "./utils";

0 commit comments

Comments
 (0)