mirror of https://github.com/sveltejs/svelte
parent
a1d6b79ffc
commit
0b07be410d
@ -0,0 +1,12 @@
|
|||||||
|
import * as assert from "assert";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
preprocess: {
|
||||||
|
script: ({ content, attributes }) => {
|
||||||
|
assert.equal(content, "");
|
||||||
|
return {
|
||||||
|
code: `console.log("${attributes["the-answer"]}");`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
<script the-answer="42"/>
|
@ -0,0 +1 @@
|
|||||||
|
<script the-answer="42">console.log("42");</script>
|
Loading…
Reference in new issue