Comparing version 1.0.1 to 1.0.2
@@ -23,2 +23,4 @@ 'use strict'; | ||
var engine = _index2.default.mjml2html; | ||
/* | ||
@@ -114,3 +116,3 @@ * The version number is the NPM | ||
return '\nimport React, { Component } from \'react\'\nimport {\n MJMLColumnElement,\n elements,\n registerElement,\n} from \'mjml\'\n\n/*\n * Wrap your dependencies here.\n */\nconst {\n ' + lowerName + ': Mj' + name + ',\n} = elements;\n\nconst NAME = \'' + lowerName + '\'\n\n@MJMLColumnElement({\n tagName: \'mj-' + lowerName + '\',\n content: \' \',\n\n /*\n * These are your default css attributes\n */\n attributes: {\n \'color\': \'#424242\',\n \'font-family\': \'Helvetica\',\n \'margin-top\': \'10px\'\n }\n})\nclass ' + name + ' extends Component {\n\n /*\n * Build your styling here\n */\n getStyles() {\n const { mjAttribute, color } = this.props\n\n return _.merge({}, this.constructor.baseStyles, {\n text: {\n /*\n * Get the color attribute\n * Example: <mj-' + lowerName + ' color="blue">content</mj-' + lowerName + '>\n */\n color: mjAttribute(\'color\')\n }\n })\n }\n\n render() {\n\n const css = this.getStyles(),\n content = \'Hello World!\'\n\n return (\n <Mj' + name + ' style={ css }>\n { content }\n </MjText>\n )\n }\n}\n\nexport default ' + name + '\n'; | ||
return '\nimport React, { Component } from \'react\'\nimport _ from \'loadash\'\nimport {\n MJMLColumnElement,\n elements,\n registerElement,\n} from \'mjml\'\n\n/*\n * Wrap your dependencies here.\n */\nconst {\n text: MjText,\n} = elements;\n\nconst NAME = \'' + lowerName + '\'\n\n@MJMLColumnElement({\n tagName: \'mj-' + lowerName + '\',\n content: \' \',\n\n /*\n * These are your default css attributes\n */\n attributes: {\n \'color\': \'#424242\',\n \'font-family\': \'Helvetica\',\n \'margin-top\': \'10px\'\n }\n})\nclass ' + name + ' extends Component {\n\n /*\n * Build your styling here\n */\n getStyles() {\n const { mjAttribute, color } = this.props\n\n return _.merge({}, this.constructor.baseStyles, {\n text: {\n /*\n * Get the color attribute\n * Example: <mj-' + lowerName + ' color="blue">content</mj-' + lowerName + '>\n */\n color: mjAttribute(\'color\')\n }\n })\n }\n\n render() {\n\n const css = this.getStyles(),\n content = \'Hello World!\'\n\n return (\n <Mj' + name + ' style={ css }>\n { content }\n </MjText>\n )\n }\n}\n\nregisterElement(\'' + lowerName + '\', ' + name + (ending ? ', true' : '') + ')\nexport default ' + name + '\n'; | ||
}; | ||
@@ -117,0 +119,0 @@ |
{ | ||
"name": "mjml", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "MJML: the only framework that makes responsive-email easy", | ||
@@ -5,0 +5,0 @@ "main": "./lib/mjml", |
@@ -7,2 +7,4 @@ import fs from 'fs' | ||
const engine = mjmlEngine.mjml2html | ||
/* | ||
@@ -72,2 +74,3 @@ * The version number is the NPM | ||
import React, { Component } from 'react' | ||
import _ from 'loadash' | ||
import { | ||
@@ -83,3 +86,3 @@ MJMLColumnElement, | ||
const { | ||
${lowerName}: Mj${name}, | ||
text: MjText, | ||
} = elements; | ||
@@ -134,2 +137,3 @@ | ||
registerElement('${lowerName}', ${name}${ending ? ', true' : ''}) | ||
export default ${name} | ||
@@ -136,0 +140,0 @@ ` |
@@ -5,6 +5,4 @@ #!/usr/bin/env node | ||
import mjmlEngine from './index' | ||
import mjmlCLI from './cli' | ||
import mjmlCLI from './cli' | ||
const engine = mjmlEngine.mjml2html | ||
/* | ||
@@ -11,0 +9,0 @@ * If require.main |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
215453
3312