Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f02d069

Browse files
committed
blah
1 parent 774c874 commit f02d069

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

tools/scripts/generate-json.mjs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
import { createWriteStream, existsSync, unlinkSync, writeFileSync } from 'fs';
1+
import { existsSync, unlinkSync, writeFileSync } from 'fs';
22
import ts from 'typescript';
3-
import { format } from 'util';
43

54
if (existsSync('tmp/log.txt')) {
65
unlinkSync('tmp/log.txt');
76
}
87

9-
const logFile = createWriteStream('tmp/log.txt', { flags: 'a' });
10-
// Or 'w' to truncate the file every time the process starts.
11-
const logStdout = process.stdout;
12-
13-
function writeToLog() {
14-
logFile.write(format.apply(null, [`------${new Date().toLocaleDateString()}------`, '\n']));
15-
// Storing without color codes
16-
logFile.write(format.apply(null, arguments).replace(/\033\[[0-9;]*m/g, '') + '\n');
17-
// Display normally, with colors to Stdout
18-
logStdout.write(format.apply(null, arguments) + '\n');
19-
}
8+
// const logFile = createWriteStream('tmp/log.txt', { flags: 'a' });
9+
// // Or 'w' to truncate the file every time the process starts.
10+
// const logStdout = process.stdout;
11+
//
12+
// function writeToLog() {
13+
// logFile.write(format.apply(null, [`------${new Date().toLocaleDateString()}------`, '\n']));
14+
// // Storing without color codes
15+
// logFile.write(format.apply(null, arguments).replace(/\033\[[0-9;]*m/g, '') + '\n');
16+
// // Display normally, with colors to Stdout
17+
// logStdout.write(format.apply(null, arguments) + '\n');
18+
// }
2019

2120
const TYPE_CHECKER_FLAGS =
2221
ts.NodeBuilderFlags.NoTruncation | ts.NodeBuilderFlags.InTypeAlias | ts.NodeBuilderFlags.NoTypeReduction;

0 commit comments

Comments
 (0)