mirror of https://github.com/sveltejs/svelte
parent
7f39b5be16
commit
6436886500
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
options: {
|
||||||
|
generate: 'ssr'
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,23 @@
|
|||||||
|
var SvelteComponent = {};
|
||||||
|
|
||||||
|
SvelteComponent.data = function() {
|
||||||
|
return {};
|
||||||
|
};
|
||||||
|
|
||||||
|
SvelteComponent.render = function(state, options) {
|
||||||
|
state = state || {};
|
||||||
|
|
||||||
|
return ``.trim();
|
||||||
|
};
|
||||||
|
|
||||||
|
SvelteComponent.renderCss = function() {
|
||||||
|
var components = [];
|
||||||
|
|
||||||
|
return {
|
||||||
|
css: components.map(x => x.css).join('\n'),
|
||||||
|
map: null,
|
||||||
|
components
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = SvelteComponent;
|
@ -0,0 +1,37 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
var SvelteComponent = {};;
|
||||||
|
|
||||||
|
SvelteComponent.data = function() {
|
||||||
|
return {};
|
||||||
|
};
|
||||||
|
|
||||||
|
SvelteComponent.render = function(state, options) {
|
||||||
|
state = state || {};
|
||||||
|
|
||||||
|
return ``.trim();
|
||||||
|
};
|
||||||
|
|
||||||
|
SvelteComponent.renderCss = function() {
|
||||||
|
var components = [];
|
||||||
|
|
||||||
|
return {
|
||||||
|
css: components.map(x => x.css).join('\n'),
|
||||||
|
map: null,
|
||||||
|
components
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
var escaped = {
|
||||||
|
'"': '"',
|
||||||
|
"'": ''',
|
||||||
|
'&': '&',
|
||||||
|
'<': '<',
|
||||||
|
'>': '>'
|
||||||
|
};
|
||||||
|
|
||||||
|
function __escape(html) {
|
||||||
|
return String(html).replace(/["'&<>]/g, match => escaped[match]);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = SvelteComponent;
|
@ -0,0 +1,23 @@
|
|||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
oncreate() {
|
||||||
|
console.log('oncreate');
|
||||||
|
},
|
||||||
|
|
||||||
|
ondestroy() {
|
||||||
|
console.log('ondestroy');
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
foo() {
|
||||||
|
console.log('foo');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
events: {
|
||||||
|
swipe(node, callback) {
|
||||||
|
// TODO implement
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in new issue