mirror of https://github.com/sveltejs/svelte
parent
cedbb28586
commit
1c81f85c11
@ -1 +1 @@
|
|||||||
<input use:tooltip="t('tooltip msg')">
|
<input use:tooltip="{t('tooltip msg')}">
|
||||||
|
@ -1 +1 @@
|
|||||||
<input use:tooltip="message">
|
<input use:tooltip={message}>
|
||||||
|
@ -1 +1 @@
|
|||||||
<input use:tooltip="'tooltip msg'">
|
<input use:tooltip="{'tooltip msg'}">
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
import { onMount } from 'svelte';
|
||||||
oncreate() {
|
|
||||||
|
onMount(() => {
|
||||||
import('./foo.js').then(foo => {
|
import('./foo.js').then(foo => {
|
||||||
console.log(foo.default);
|
console.log(foo.default);
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
}
|
|
||||||
</script>
|
</script>
|
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "invalid-directive-value",
|
|
||||||
"message": "directive values should not be wrapped — use 'foo', not '{foo}'",
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19,
|
|
||||||
"character": 19
|
|
||||||
},
|
|
||||||
"pos": 19
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
<input bind:value='{foo}'>
|
|
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "invalid-directive-value",
|
|
||||||
"message": "Can only bind to an identifier (e.g. `foo`) or a member expression (e.g. `foo.bar` or `foo[baz]`)",
|
|
||||||
"pos": 19,
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19,
|
|
||||||
"character": 19
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
<input bind:value='a + b'>
|
|
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "invalid-directive-value",
|
|
||||||
"message": "Expected a method call",
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15,
|
|
||||||
"character": 15
|
|
||||||
},
|
|
||||||
"pos": 15
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
<div on:click='foo'></div>
|
|
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "invalid-directive-value",
|
|
||||||
"message": "ref directives cannot have a value",
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14,
|
|
||||||
"character": 14
|
|
||||||
},
|
|
||||||
"pos": 14
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
<div ref:foo='bar'></div>
|
|
@ -1,5 +1,5 @@
|
|||||||
<div></div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// TODO write some code
|
// TODO write some code
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<div></div>
|
@ -1,25 +1,27 @@
|
|||||||
{
|
{
|
||||||
"html": {
|
"html": {
|
||||||
"start": 0,
|
"start": 45,
|
||||||
"end": 11,
|
"end": 56,
|
||||||
"type": "Fragment",
|
"type": "Fragment",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"start": 0,
|
"start": 43,
|
||||||
"end": 11,
|
"end": 45,
|
||||||
|
"type": "Text",
|
||||||
|
"data": "\n\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start": 45,
|
||||||
|
"end": 56,
|
||||||
"type": "Element",
|
"type": "Element",
|
||||||
"name": "div",
|
"name": "div",
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"children": []
|
"children": []
|
||||||
},
|
|
||||||
{
|
|
||||||
"start": 11,
|
|
||||||
"end": 13,
|
|
||||||
"type": "Text",
|
|
||||||
"data": "\n\n"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"css": null,
|
"css": [],
|
||||||
"js": null
|
"js": [
|
||||||
|
null
|
||||||
|
]
|
||||||
}
|
}
|
@ -1,13 +1,9 @@
|
|||||||
<h1>Hello {name}!</h1>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
let name = 'world';
|
||||||
data: () => ({
|
|
||||||
name: 'world'
|
|
||||||
})
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
trailing multiline comment
|
trailing multiline comment
|
||||||
*/
|
*/
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<h1>Hello {name}!</h1>
|
||||||
|
@ -1,127 +1,89 @@
|
|||||||
{
|
{
|
||||||
"html": {
|
"html": {
|
||||||
"start": 0,
|
"start": 79,
|
||||||
"end": 22,
|
"end": 101,
|
||||||
"type": "Fragment",
|
"type": "Fragment",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"start": 0,
|
"start": 77,
|
||||||
"end": 22,
|
"end": 79,
|
||||||
|
"type": "Text",
|
||||||
|
"data": "\n\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start": 79,
|
||||||
|
"end": 101,
|
||||||
"type": "Element",
|
"type": "Element",
|
||||||
"name": "h1",
|
"name": "h1",
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"start": 4,
|
"start": 83,
|
||||||
"end": 10,
|
"end": 89,
|
||||||
"type": "Text",
|
"type": "Text",
|
||||||
"data": "Hello "
|
"data": "Hello "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"start": 10,
|
"start": 89,
|
||||||
"end": 16,
|
"end": 95,
|
||||||
"type": "MustacheTag",
|
"type": "MustacheTag",
|
||||||
"expression": {
|
"expression": {
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"start": 11,
|
"start": 90,
|
||||||
"end": 15,
|
"end": 94,
|
||||||
"name": "name"
|
"name": "name"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"start": 16,
|
"start": 95,
|
||||||
"end": 17,
|
"end": 96,
|
||||||
"type": "Text",
|
"type": "Text",
|
||||||
"data": "!"
|
"data": "!"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"start": 22,
|
|
||||||
"end": 24,
|
|
||||||
"type": "Text",
|
|
||||||
"data": "\n\n"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"css": null,
|
"css": [],
|
||||||
"js": {
|
"js": [
|
||||||
"start": 24,
|
{
|
||||||
"end": 141,
|
"start": 0,
|
||||||
|
"end": 77,
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"content": {
|
"content": {
|
||||||
"type": "Program",
|
"type": "Program",
|
||||||
"start": 32,
|
"start": 8,
|
||||||
"end": 132,
|
"end": 68,
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"type": "ExportDefaultDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"start": 34,
|
"start": 10,
|
||||||
"end": 93,
|
"end": 29,
|
||||||
"declaration": {
|
"declarations": [
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 49,
|
|
||||||
"end": 92,
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 53,
|
|
||||||
"end": 89,
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 53,
|
|
||||||
"end": 57,
|
|
||||||
"name": "data"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 59,
|
|
||||||
"end": 89,
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"async": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 66,
|
|
||||||
"end": 88,
|
|
||||||
"properties": [
|
|
||||||
{
|
{
|
||||||
"type": "Property",
|
"type": "VariableDeclarator",
|
||||||
"start": 71,
|
"start": 14,
|
||||||
"end": 84,
|
"end": 28,
|
||||||
"method": false,
|
"id": {
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"start": 71,
|
"start": 14,
|
||||||
"end": 75,
|
"end": 18,
|
||||||
"name": "name"
|
"name": "name"
|
||||||
},
|
},
|
||||||
"value": {
|
"init": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"start": 77,
|
"start": 21,
|
||||||
"end": 84,
|
"end": 28,
|
||||||
"value": "world",
|
"value": "world",
|
||||||
"raw": "'world'"
|
"raw": "'world'"
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"kind": "let"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -1,11 +1,7 @@
|
|||||||
<h1>Hello {name}!</h1>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
let name = 'world';
|
||||||
data: () => ({
|
|
||||||
name: 'world'
|
|
||||||
})
|
|
||||||
};
|
|
||||||
|
|
||||||
// trailing line comment
|
// trailing line comment
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<h1>Hello {name}!</h1>
|
||||||
|
@ -1,127 +1,89 @@
|
|||||||
{
|
{
|
||||||
"html": {
|
"html": {
|
||||||
"start": 0,
|
"start": 68,
|
||||||
"end": 22,
|
"end": 90,
|
||||||
"type": "Fragment",
|
"type": "Fragment",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"start": 0,
|
"start": 66,
|
||||||
"end": 22,
|
"end": 68,
|
||||||
|
"type": "Text",
|
||||||
|
"data": "\n\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start": 68,
|
||||||
|
"end": 90,
|
||||||
"type": "Element",
|
"type": "Element",
|
||||||
"name": "h1",
|
"name": "h1",
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"start": 4,
|
"start": 72,
|
||||||
"end": 10,
|
"end": 78,
|
||||||
"type": "Text",
|
"type": "Text",
|
||||||
"data": "Hello "
|
"data": "Hello "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"start": 10,
|
"start": 78,
|
||||||
"end": 16,
|
"end": 84,
|
||||||
"type": "MustacheTag",
|
"type": "MustacheTag",
|
||||||
"expression": {
|
"expression": {
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"start": 11,
|
"start": 79,
|
||||||
"end": 15,
|
"end": 83,
|
||||||
"name": "name"
|
"name": "name"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"start": 16,
|
"start": 84,
|
||||||
"end": 17,
|
"end": 85,
|
||||||
"type": "Text",
|
"type": "Text",
|
||||||
"data": "!"
|
"data": "!"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"start": 22,
|
|
||||||
"end": 24,
|
|
||||||
"type": "Text",
|
|
||||||
"data": "\n\n"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"css": null,
|
"css": [],
|
||||||
"js": {
|
"js": [
|
||||||
"start": 24,
|
{
|
||||||
"end": 130,
|
"start": 0,
|
||||||
|
"end": 66,
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"content": {
|
"content": {
|
||||||
"type": "Program",
|
"type": "Program",
|
||||||
"start": 32,
|
"start": 8,
|
||||||
"end": 121,
|
"end": 57,
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"type": "ExportDefaultDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"start": 34,
|
"start": 10,
|
||||||
"end": 93,
|
"end": 29,
|
||||||
"declaration": {
|
"declarations": [
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 49,
|
|
||||||
"end": 92,
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 53,
|
|
||||||
"end": 89,
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 53,
|
|
||||||
"end": 57,
|
|
||||||
"name": "data"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 59,
|
|
||||||
"end": 89,
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"async": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 66,
|
|
||||||
"end": 88,
|
|
||||||
"properties": [
|
|
||||||
{
|
{
|
||||||
"type": "Property",
|
"type": "VariableDeclarator",
|
||||||
"start": 71,
|
"start": 14,
|
||||||
"end": 84,
|
"end": 28,
|
||||||
"method": false,
|
"id": {
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"start": 71,
|
"start": 14,
|
||||||
"end": 75,
|
"end": 18,
|
||||||
"name": "name"
|
"name": "name"
|
||||||
},
|
},
|
||||||
"value": {
|
"init": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"start": 77,
|
"start": 21,
|
||||||
"end": 84,
|
"end": 28,
|
||||||
"value": "world",
|
"value": "world",
|
||||||
"raw": "'world'"
|
"raw": "'world'"
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"kind": "let"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -1,9 +1,5 @@
|
|||||||
<h1>Hello {name}!</h1>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
let name = 'world';
|
||||||
data: () => ({
|
|
||||||
name: 'world'
|
|
||||||
})
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<h1>Hello {name}!</h1>
|
@ -1,127 +1,89 @@
|
|||||||
{
|
{
|
||||||
"html": {
|
"html": {
|
||||||
"start": 0,
|
"start": 41,
|
||||||
"end": 22,
|
"end": 63,
|
||||||
"type": "Fragment",
|
"type": "Fragment",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"start": 0,
|
"start": 39,
|
||||||
"end": 22,
|
"end": 41,
|
||||||
|
"type": "Text",
|
||||||
|
"data": "\n\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start": 41,
|
||||||
|
"end": 63,
|
||||||
"type": "Element",
|
"type": "Element",
|
||||||
"name": "h1",
|
"name": "h1",
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"start": 4,
|
"start": 45,
|
||||||
"end": 10,
|
"end": 51,
|
||||||
"type": "Text",
|
"type": "Text",
|
||||||
"data": "Hello "
|
"data": "Hello "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"start": 10,
|
"start": 51,
|
||||||
"end": 16,
|
"end": 57,
|
||||||
"type": "MustacheTag",
|
"type": "MustacheTag",
|
||||||
"expression": {
|
"expression": {
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"start": 11,
|
"start": 52,
|
||||||
"end": 15,
|
"end": 56,
|
||||||
"name": "name"
|
"name": "name"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"start": 16,
|
"start": 57,
|
||||||
"end": 17,
|
"end": 58,
|
||||||
"type": "Text",
|
"type": "Text",
|
||||||
"data": "!"
|
"data": "!"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"start": 22,
|
|
||||||
"end": 24,
|
|
||||||
"type": "Text",
|
|
||||||
"data": "\n\n"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"css": null,
|
"css": [],
|
||||||
"js": {
|
"js": [
|
||||||
"start": 24,
|
{
|
||||||
"end": 103,
|
"start": 0,
|
||||||
|
"end": 39,
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"content": {
|
"content": {
|
||||||
"type": "Program",
|
"type": "Program",
|
||||||
"start": 32,
|
"start": 8,
|
||||||
"end": 94,
|
"end": 30,
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"type": "ExportDefaultDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"start": 34,
|
"start": 10,
|
||||||
"end": 93,
|
"end": 29,
|
||||||
"declaration": {
|
"declarations": [
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 49,
|
|
||||||
"end": 92,
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 53,
|
|
||||||
"end": 89,
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 53,
|
|
||||||
"end": 57,
|
|
||||||
"name": "data"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 59,
|
|
||||||
"end": 89,
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"async": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 66,
|
|
||||||
"end": 88,
|
|
||||||
"properties": [
|
|
||||||
{
|
{
|
||||||
"type": "Property",
|
"type": "VariableDeclarator",
|
||||||
"start": 71,
|
"start": 14,
|
||||||
"end": 84,
|
"end": 28,
|
||||||
"method": false,
|
"id": {
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"start": 71,
|
"start": 14,
|
||||||
"end": 75,
|
"end": 18,
|
||||||
"name": "name"
|
"name": "name"
|
||||||
},
|
},
|
||||||
"value": {
|
"init": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"start": 77,
|
"start": 21,
|
||||||
"end": 84,
|
"end": 28,
|
||||||
"value": "world",
|
"value": "world",
|
||||||
"raw": "'world'"
|
"raw": "'world'"
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"kind": "let"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -1 +1 @@
|
|||||||
<div in:style='{opacity: 0}'>fades in</div>
|
<div in:style="{{opacity: 0}}">fades in</div>
|
Loading…
Reference in new issue