// Template function for rendering the boilerplate html for browsers export default function({ meteorRuntimeConfig, rootUrlPathPrefix, inlineScriptsAllowed, css, js, additionalStaticJs, htmlAttributes, bundledJsCssUrlRewriteHook, head, body, dynamicHead, dynamicBody, }) { return [].concat( [ ' _.template(' <%= attrName %>="<%- attrValue %>"')({ attrName: key, attrValue: value }) ).join('') + '>', '
' ], [ head, dynamicHead, ], _.map(css, ({url}) => _.template(' ')({ href: bundledJsCssUrlRewriteHook(url) }) ), [ '', '', body, dynamicBody, '', (inlineScriptsAllowed ? _.template(' ')({ conf: meteorRuntimeConfig }) : _.template(' ')({ src: rootUrlPathPrefix }) ) , '' ], _.map(js, ({url}) => _.template(' ')({ src: bundledJsCssUrlRewriteHook(url) }) ), _.map(additionalStaticJs, ({contents, pathname}) => ( (inlineScriptsAllowed ? _.template(' ')({ contents: contents }) : _.template(' ')({ src: rootUrlPathPrefix + pathname })) )), [ '', '', '', '' ], ).join('\n'); }