Skip to content

Commit bfc657c

Browse files
authored
(chore) small svelte-check output adjustments (#1042)
Less ===, add additional text when in watch mode
1 parent 146073f commit bfc657c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/svelte-check/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ function instantiateWriter(opts: SvelteCheckCliOptions): Writer {
177177
return new HumanFriendlyWriter(
178178
process.stdout,
179179
opts.outputFormat === 'human-verbose',
180+
opts.watch,
180181
filter
181182
);
182183
} else {

packages/svelte-check/src/writers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class HumanFriendlyWriter implements Writer {
2323
constructor(
2424
private stream: Writable,
2525
private isVerbose = true,
26+
private isWatchMode = false,
2627
private diagnosticFilter: DiagnosticFilter = DEFAULT_FILTER
2728
) {}
2829

@@ -37,10 +38,10 @@ export class HumanFriendlyWriter implements Writer {
3738

3839
if (this.isVerbose) {
3940
this.stream.write('\n');
41+
this.stream.write('====================================\n');
4042
this.stream.write(`Loading svelte-check in workspace: ${workspaceDir}`);
4143
this.stream.write('\n');
4244
this.stream.write('Getting Svelte diagnostics...\n');
43-
this.stream.write('====================================\n');
4445
this.stream.write('\n');
4546
}
4647
}
@@ -120,6 +121,9 @@ export class HumanFriendlyWriter implements Writer {
120121
} else {
121122
this.stream.write(chalk.green(message));
122123
}
124+
if (this.isWatchMode) {
125+
this.stream.write('Watching for file changes...');
126+
}
123127
}
124128

125129
failure(err: Error) {

0 commit comments

Comments
 (0)