File tree Expand file tree Collapse file tree 4 files changed +1931
-14
lines changed Expand file tree Collapse file tree 4 files changed +1931
-14
lines changed Original file line number Diff line number Diff line change 1+ <script lang =" ts" >
2+ import { onMount } from ' svelte' ;
3+ let Plotly: null | typeof import (" plotly.js" );
4+
5+ export let element: HTMLDivElement = null as never ;
6+
7+ console .log (element );
8+
9+ onMount (async () => {
10+ Plotly = await import (" plotly.js" );
11+ console .log (' loaded' , Plotly );
12+ });
13+ </script >
14+
15+ <div bind:this ={element }></div >
Original file line number Diff line number Diff line change 11{
22 "name" : " svelte-plotly.js" ,
3- "version" : " 0 .0.1 " ,
3+ "version" : " 1 .0.0 " ,
44 "scripts" : {
55 "dev" : " svelte-kit dev" ,
66 "build" : " svelte-kit build" ,
1717 "@sveltejs/kit" : " next" ,
1818 "@typescript-eslint/eslint-plugin" : " ^5.10.1" ,
1919 "@typescript-eslint/parser" : " ^5.10.1" ,
20+ "buffer" : " ^6.0.3" ,
2021 "eslint" : " ^8.12.0" ,
2122 "eslint-config-prettier" : " ^8.3.0" ,
2223 "eslint-plugin-svelte3" : " ^4.0.0" ,
2829 "tslib" : " ^2.3.1" ,
2930 "typescript" : " ~4.6.2"
3031 },
31- "type" : " module"
32- }
32+ "type" : " module" ,
33+ "dependencies" : {
34+ "@types/plotly.js" : " ^1.54.20" ,
35+ "plotly.js" : " ^2.12.1"
36+ }
37+ }
Original file line number Diff line number Diff line change 1+ <script lang =" ts" >
2+ import Plot from " ../../lib/Plot.svelte" ;
3+ </script >
4+
15<h1 >Welcome to SvelteKit</h1 >
26<p >Visit <a href =" https://kit.svelte.dev" >kit.svelte.dev</a > to read the documentation</p >
7+
8+ <Plot />
You can’t perform that action at this time.
0 commit comments