@coorpacademy/treantjs-adapter-dust
Advanced tools
Comparing version 7.0.6 to 7.0.7
@@ -7,3 +7,5 @@ import map from 'lodash/fp/map'; | ||
const DefaultProvider = ({ children }) => children; | ||
const DefaultProvider = ({ | ||
children | ||
}) => children; | ||
@@ -16,5 +18,3 @@ const toHelpers = (components, Provider = DefaultProvider) => { | ||
const providerProps = providerPropsAttribute ? context.get(providerPropsAttribute) : {}; | ||
const html = renderToStaticMarkup(createElement(Provider, providerProps, createElement(Component, props))); | ||
chunk.write(html); | ||
@@ -21,0 +21,0 @@ }; |
@@ -1,24 +0,21 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
var _map = require('lodash/fp/map'); | ||
var _map = _interopRequireDefault(require("lodash/fp/map")); | ||
var _map2 = _interopRequireDefault(_map); | ||
var _toPairs = _interopRequireDefault(require("lodash/fp/toPairs")); | ||
var _toPairs = require('lodash/fp/toPairs'); | ||
var _kebabCase = _interopRequireDefault(require("lodash/fp/kebabCase")); | ||
var _toPairs2 = _interopRequireDefault(_toPairs); | ||
var _react = require("react"); | ||
var _kebabCase = require('lodash/fp/kebabCase'); | ||
var _server = require("react-dom/server"); | ||
var _kebabCase2 = _interopRequireDefault(_kebabCase); | ||
var _react = require('react'); | ||
var _server = require('react-dom/server'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
const DefaultProvider = ({ children }) => children; | ||
const DefaultProvider = ({ | ||
children | ||
}) => children; | ||
@@ -28,8 +25,6 @@ const toHelpers = (components, Provider = DefaultProvider) => { | ||
return (dust, options) => { | ||
dust.helpers[(0, _kebabCase2.default)(componentName)] = (chunk, context, bodies, props) => { | ||
dust.helpers[(0, _kebabCase.default)(componentName)] = (chunk, context, bodies, props) => { | ||
const providerPropsAttribute = props.context; | ||
const providerProps = providerPropsAttribute ? context.get(providerPropsAttribute) : {}; | ||
const html = (0, _server.renderToStaticMarkup)((0, _react.createElement)(Provider, providerProps, (0, _react.createElement)(Component, props))); | ||
chunk.write(html); | ||
@@ -40,6 +35,7 @@ }; | ||
return (0, _map2.default)(toHelper, (0, _toPairs2.default)(components)); | ||
return (0, _map.default)(toHelper, (0, _toPairs.default)(components)); | ||
}; | ||
exports.default = toHelpers; | ||
var _default = toHelpers; | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@coorpacademy/treantjs-adapter-dust", | ||
"version": "7.0.6", | ||
"version": "7.0.7", | ||
"description": "", | ||
@@ -34,6 +34,6 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"babel-cli": "^6.24.1", | ||
"babel-core": "^6.24.1", | ||
"@babel/cli": "^7.4.3", | ||
"@babel/core": "^7.4.3", | ||
"@babel/preset-env": "^7.4.3", | ||
"babel-plugin-istanbul": "^4.1.4", | ||
"babel-preset-env": "^1.5.2", | ||
"cross-env": "^5.0.0", | ||
@@ -45,3 +45,3 @@ "dustjs-linkedin": "^2.7.5", | ||
"author": "CoorpAcademy", | ||
"gitHead": "804fb805b3d1f34deb314d612e73702e52639e66" | ||
"gitHead": "e453c637a5638431446e42a68c8149be9c01a9a6" | ||
} |
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
24193
14
256