Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump mjml to 4 #25

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"commander": "^2.11.0",
"htmlparser2": "^3.9.2",
"lodash": "^4.17.2",
"mjml": "^3.2.2"
"mjml": "^4.0.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
Expand Down
4 changes: 2 additions & 2 deletions src/mjml2json.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from 'lodash'
import htmlparser from 'htmlparser2'
import MJMLElements from 'mjml-core/lib/MJMLElementsCollection'
import {globalComponents} from 'mjml-core'

import './register-mjml'

Expand All @@ -9,7 +9,7 @@ const MJElements = []

_.forEach(
{
...MJMLElements,
...globalComponents,
},
(element, name) => {
const tagName = element.tagName || name
Expand Down
14 changes: 3 additions & 11 deletions src/register-mjml.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@ import each from 'lodash/each'

import Button from 'mjml-button'
import Column from 'mjml-column'
import Container from 'mjml-container'
import Divider from 'mjml-divider'
import Group from 'mjml-group'
import Html from 'mjml-html'
import Image from 'mjml-image'
import Location from 'mjml-location'
import MJAccordion from 'mjml-accordion'
import MJCarousel from 'mjml-carousel'
import MJHero from 'mjml-hero'
import MJInvoice from 'mjml-invoice'
import MJNavbar from 'mjml-navbar'
import Raw from 'mjml-raw'
import Section from 'mjml-section'
import Social from 'mjml-social'
import MJSocial from 'mjml-social'
import Spacer from 'mjml-spacer'
import Table from 'mjml-table'
import Text from 'mjml-text'
Expand All @@ -30,9 +26,9 @@ import MJHeadTitle from 'mjml-head-title'

const { Accordion, AccordionElement, AccordionTitle, AccordionText } = MJAccordion
const { Hero, HeroContent } = MJHero
const { Invoice, InvoiceItem } = MJInvoice
const { Carousel, CarouselImage } = MJCarousel
const { Navbar, InlineLinks, Link } = MJNavbar
const { Social, SocialElement } = MJSocial

each(
[
Expand All @@ -44,22 +40,18 @@ each(
Carousel,
CarouselImage,
Column,
Container,
Divider,
Group,
Hero,
HeroContent,
Html,
Image,
InlineLinks,
Invoice,
InvoiceItem,
Link,
Location,
Navbar,
Raw,
Section,
Social,
SocialElement,
Spacer,
Table,
Text,
Expand Down
Loading