Skip to content

Commit b736736

Browse files
committed
chore: breaking changes
1 parent 723ab3a commit b736736

File tree

4 files changed

+22
-24
lines changed

4 files changed

+22
-24
lines changed

rollup.config.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,29 @@ import terser from '@rollup/plugin-terser';
66
import sveltePreprocess from 'svelte-preprocess';
77
import css from 'rollup-plugin-css-only';
88
import copy from 'rollup-plugin-copy';
9+
import { spawn } from 'child_process';
910

1011
const production = !process.env.ROLLUP_WATCH;
1112

1213
function serve() {
13-
let server;
14+
let server;
1415

15-
function toExit() {
16-
if (server) server.kill(0);
17-
}
16+
function toExit() {
17+
if (server) server.kill(0);
18+
}
1819

19-
return {
20-
writeBundle() {
21-
if (server) return;
22-
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
23-
stdio: ['ignore', 'inherit', 'inherit'],
24-
shell: true
25-
});
20+
return {
21+
writeBundle() {
22+
if (server) return;
23+
server = spawn('npm', ['run', 'start', '--', '--dev'], {
24+
stdio: ['ignore', 'inherit', 'inherit'],
25+
shell: true
26+
});
2627

27-
process.on('SIGTERM', toExit);
28-
process.on('exit', toExit);
29-
}
30-
};
28+
process.on('SIGTERM', toExit);
29+
process.on('exit', toExit);
30+
}
31+
};
3132
}
3233

3334
export default {

src/Chart.svelte

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<script context="module">
22
import Highcharts, { color } from "highcharts";
3-
import more from "highcharts/highcharts-more";
4-
import accessibility from "highcharts/modules/accessibility";
5-
6-
more(Highcharts);
7-
accessibility(Highcharts);
3+
import "highcharts/highcharts-more";
4+
import "highcharts/modules/accessibility";
85
96
export function createChart() {
107
return Highcharts.chart("container", {

src/main.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import App from './App.svelte';
2+
import { mount } from 'svelte';
23

3-
var app = new App({
4-
target: document.body
5-
});
4+
const app = mount(App, { target: document.getElementById("app") });
65

7-
export default app;
6+
export default app;

static/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
</head>
99

1010
<body>
11+
<div id="app"></div>
1112
</body>
1213
</html>

0 commit comments

Comments
 (0)