Skip to content

Commit bba4291

Browse files
committed
remove redundant logging
1 parent eebc8c9 commit bba4291

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/build.ts

-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ export async function build(context: CommandContext = makeCommandContext()) {
7474
console.error("missing referenced file", sourcePath);
7575
continue;
7676
}
77-
if (verbose) process.stdout.write(`generate ${loader.path} → `);
7877
sourcePath = join(sourceRoot, await loader.load({verbose}));
79-
if (verbose) console.log(sourcePath);
8078
}
8179
if (verbose) console.log("copy", sourcePath, "→", outputPath);
8280
await prepareOutput(outputPath);

src/dataloader.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,16 @@ export class Loader {
114114
runningCommands.set(this.path, command);
115115
}
116116
if (verbose) {
117-
console.info(`${this.path} start`);
117+
process.stdout.write(`load ${this.path} `);
118118
const start = performance.now();
119119
command.then(
120120
(path) => {
121-
console.info(
122-
`${this.path} ${green("success")} ${formatSize(
123-
statSync(join(this.sourceRoot, path)).size
124-
)} in ${formatElapsed(start)}`
121+
console.log(
122+
`${green("success")} ${formatSize(statSync(join(this.sourceRoot, path)).size)} in ${formatElapsed(start)}`
125123
);
126124
},
127125
(error) => {
128-
console.info(`${this.path} ${red("error")} after ${formatElapsed(start)}: ${error.message}`);
126+
console.log(`${red("error")} after ${formatElapsed(start)}: ${error.message}`);
129127
}
130128
);
131129
}

0 commit comments

Comments
 (0)