You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/js/samples/ssr-preserve-comments/expected.js

48 lines
884 B

"use strict";
var SvelteComponent = {};;
SvelteComponent.data = function() {
return {};
};
SvelteComponent.render = function(state, options = {}) {
var components = new Set();
function addComponent(component) {
components.add(component);
}
var result = { head: '', addComponent };
var html = SvelteComponent._render(result, state, options);
var cssCode = Array.from(components).map(c => c.css && c.css.code).filter(Boolean).join('\n');
return {
html,
head: result.head,
css: { code: cssCode, map: null },
toString() {
return html;
}
};
}
SvelteComponent._render = function(__result, ctx, options) {
__result.addComponent(SvelteComponent);
ctx = Object.assign({}, ctx);
return `<div>content</div>
<!-- comment -->
<div>more content</div>`;
};
SvelteComponent.css = {
code: '',
map: null
};
var warned = false;
7 years ago
module.exports = SvelteComponent;