(vo: Variables)
| 42 | } |
| 43 | |
| 44 | const template = (vo: Variables) => ` |
| 45 | <!DOCTYPE html> |
| 46 | <html> |
| 47 | <head> |
| 48 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> |
| 49 | ${googleAnalytics(vo.gaId)} |
| 50 | <meta charset="utf-8"> |
| 51 | <meta http-equiv="Content-Language" content="en"> |
| 52 | <title>Digraph</title> |
| 53 | <link rel="icon" href="/static/images/favicon.svg" type="image/svg+xml" sizes="any"> |
| 54 | ${joinArray(getStylesheet, vo.vendorCSSBundle)} |
| 55 | ${getStylesheet(vo.mainCSSBundle)} |
| 56 | </head> |
| 57 | |
| 58 | <body> |
| 59 | <div id="root"><div>${vo.root}</div></div> |
| 60 | ${joinArray(getDeferScript, vo.vendorJSBundle)} |
| 61 | ${getDeferScript(vo.mainJSBundle)} |
| 62 | <script> |
| 63 | window.__RELAY_PAYLOADS__ = ${vo.relayPayloads}; |
| 64 | window.__PRELOADED_STATE__ = ${vo.state}; |
| 65 | </script> |
| 66 | </body> |
| 67 | </html> |
| 68 | ` |
| 69 | |
| 70 | const toString = (state: Object) => JSON.stringify(state).replace(/</g, '\\u003c') |
| 71 |
no test coverage detected