1.6.1 • Published 7 months ago

jsx-email-builder v1.6.1

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
7 months ago

JSX Email Builder

JSX Email Builder is a tool for building HTML emails using JSX. It does this by compiling JSX to HTML and then inlining the CSS. No more writing HTML emails by hand!

Your templates will look like this:

// imports come here

function Root() {
  return (
    <EmailTemplate>
      <Header>My Company</Header>
      <Body>
        <SubHeader>Welcome to My Company!</SubHeader>
        <Main>
          <Paragraph>
            We're so excited to have you on board. We hope you enjoy your time
            here.
          </Paragraph>
          <Button href="https://mycompany.com">Visit My Company</Button>
        </Main>
      </Body>
    </EmailTemplate>
  );
}

Features

Translations

Jsx email builder uses i18next for translations so all the power of i18next is at your disposal.

Prerequisites

  • Node.js 16 or higher

    make sure you have the latest version of Node.js installed. You can check your version by running node -v in your terminal.

  • NPM 8 or higher

    make sure you have the latest version of NPM installed. You can check your version by running npm -v in your terminal.

Create a new project

If you don't have a project yet, you can create one by running the following command:

npx jsx-email-builder@latest init my-project

Or optionally, you can specify the project directory and the templates directory:

npx jsx-email-builder@latest init my-project --projectDir ../projects --templatesDir templates

aliases: new, create

This will create a new project in the my-project directory. It will also create a templates directory with some example templates. Feel free to delete or modify these templates.

Now it's time to install the dependencies:

npm install

or

yarn install

Run your project

npm run start

Or using yarn:

yarn start

This will start a development server that will watch your templates and recompile them when they change. By default, it will run on port 3000, but you can change this by passing the --port flag. To view your templates, go to http://localhost:3000/ in your browser.

Build your project

npm run build

Or using yarn:

yarn build

This will compile all of your JSX email templates into HTML files.

1.6.1

7 months ago

1.6.0

7 months ago

1.4.2

8 months ago

1.4.1

8 months ago

1.4.0

8 months ago

1.5.0

7 months ago

1.2.0

9 months ago

1.2.1

9 months ago

1.1.0

9 months ago

1.3.1

9 months ago

1.3.0

9 months ago

0.23.0

9 months ago

0.24.0

9 months ago

0.22.0

12 months ago

0.20.1

1 year ago

0.20.0

1 year ago

0.19.0

1 year ago

0.19.1

1 year ago

0.19.2

1 year ago

0.13.0

1 year ago

0.15.0

1 year ago

0.15.1

1 year ago

0.17.0

1 year ago

0.15.2

1 year ago

0.17.1

1 year ago

0.21.0

12 months ago

0.12.0

1 year ago

0.14.0

1 year ago

0.16.0

1 year ago

0.18.0

1 year ago

0.20.2

1 year ago

0.11.0

1 year ago

0.10.5

1 year ago

0.10.4

1 year ago

0.10.3

1 year ago

0.10.2

1 year ago

0.10.1

1 year ago

0.10.0

1 year ago

0.9.1

1 year ago

0.9.0

1 year ago

0.8.5

1 year ago

0.8.4

1 year ago

0.8.3

1 year ago

0.8.2

1 year ago

0.8.1

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago

1.0.0

1 year ago