mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-12 22:10:01 -04:00
make rewriter logs a flag
This commit is contained in:
parent
dc86f0eaf2
commit
d79811d609
4 changed files with 5 additions and 3 deletions
|
@ -14,7 +14,7 @@ export default defineConfig({
|
||||||
[
|
[
|
||||||
"@estruyf/github-actions-reporter",
|
"@estruyf/github-actions-reporter",
|
||||||
<GitHubActionOptions>{
|
<GitHubActionOptions>{
|
||||||
title: "My custom title",
|
title: "Test summary",
|
||||||
useDetails: true,
|
useDetails: true,
|
||||||
showError: true,
|
showError: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -35,6 +35,7 @@ export class ScramjetController {
|
||||||
cleanerrors: false,
|
cleanerrors: false,
|
||||||
scramitize: false,
|
scramitize: false,
|
||||||
sourcemaps: false,
|
sourcemaps: false,
|
||||||
|
rewriterLogs: false,
|
||||||
},
|
},
|
||||||
siteFlags: {},
|
siteFlags: {},
|
||||||
codec: {
|
codec: {
|
||||||
|
|
|
@ -38,14 +38,14 @@ function rewriteJsWrapper(
|
||||||
const { js, errors, duration } = out;
|
const { js, errors, duration } = out;
|
||||||
|
|
||||||
// TODO: maybe make this a scram flag?
|
// TODO: maybe make this a scram flag?
|
||||||
if (true) {
|
if (flagEnabled("rewriterLogs", meta.base)) {
|
||||||
for (const error of errors) {
|
for (const error of errors) {
|
||||||
console.error("oxc parse error", error);
|
console.error("oxc parse error", error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: maybe make this a scram flag?
|
// TODO: maybe make this a scram flag?
|
||||||
if (true) {
|
if (flagEnabled("rewriterLogs", meta.base)) {
|
||||||
let timespan: string;
|
let timespan: string;
|
||||||
if (duration < 1n) {
|
if (duration < 1n) {
|
||||||
timespan = "BLAZINGLY FAST";
|
timespan = "BLAZINGLY FAST";
|
||||||
|
|
1
src/types.d.ts
vendored
1
src/types.d.ts
vendored
|
@ -32,6 +32,7 @@ type ScramjetFlags = {
|
||||||
scramitize: boolean;
|
scramitize: boolean;
|
||||||
sourcemaps: boolean;
|
sourcemaps: boolean;
|
||||||
syncxhr: boolean;
|
syncxhr: boolean;
|
||||||
|
rewriterLogs: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface ScramjetConfig {
|
interface ScramjetConfig {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue