Verbose log helper function added to all the others now
This commit is contained in:
parent
5f1f157152
commit
41b0ce75d3
|
@ -41,10 +41,13 @@ export default defineIntegration({
|
||||||
"RSSGenerator",
|
"RSSGenerator",
|
||||||
)}`,
|
)}`,
|
||||||
);
|
);
|
||||||
|
const verboseLogsInfo = (message:string) => {
|
||||||
if (options.verbose) {
|
if (options.verbose) {
|
||||||
RSSLogger.info(c.bold(c.green("RSS Feed Setup Complete")));
|
RSSLogger.info(message);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
verboseLogsInfo(c.bold(c.green("RSS Feed Setup Complete")));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -73,12 +73,13 @@ export default defineIntegration({
|
||||||
"SatoriOG",
|
"SatoriOG",
|
||||||
)}`,
|
)}`,
|
||||||
);
|
);
|
||||||
|
const verboseLogsInfo = (message:string) => {
|
||||||
if (options.verbose) {
|
if (options.verbose) {
|
||||||
SatoriLogger.info(
|
SatoriLogger.info(message);
|
||||||
c.bold(c.green("OG Image Integration Setup Complete")),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
verboseLogsInfo(c.bold(c.green("OG Image Integration Setup Complete")));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,25 +25,27 @@ export default defineIntegration({
|
||||||
"Theme Provider",
|
"Theme Provider",
|
||||||
)}`,
|
)}`,
|
||||||
);
|
);
|
||||||
|
const verboseLogsInfo = (message:string) => {
|
||||||
|
if (options.verbose) {
|
||||||
|
themeLogger.info(message);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
themeLogger.info(
|
themeLogger.info(
|
||||||
c.bold(c.magenta("Theme Provider enabled. Setting up...")),
|
c.bold(c.magenta("Theme Provider enabled. Setting up...")),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (options.verbose) {
|
|
||||||
if (options.theme === "@matthiesenxyz/astro-ghostcms-theme-default") {
|
if (options.theme === "@matthiesenxyz/astro-ghostcms-theme-default") {
|
||||||
themeLogger.info(
|
verboseLogsInfo(
|
||||||
c.blue("No theme is set, injecting default theme"),
|
c.blue("No theme is set, injecting default theme"),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
themeLogger.info(
|
verboseLogsInfo(`${c.bold(c.cyan("Injecting Theme:"))} ${c.bold(c.underline(c.magenta(options.theme)))}`);
|
||||||
`${c.bold(c.cyan("Injecting Theme:"))} ${c.bold(
|
|
||||||
c.underline(c.magenta(options.theme)),
|
|
||||||
)}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
injectRoute({
|
injectRoute({
|
||||||
pattern: "/",
|
pattern: "/",
|
||||||
entrypoint: `${options.theme}/index.astro`,
|
entrypoint: `${options.theme}/index.astro`,
|
||||||
|
@ -85,10 +87,13 @@ export default defineIntegration({
|
||||||
"Theme Provider",
|
"Theme Provider",
|
||||||
)}`,
|
)}`,
|
||||||
);
|
);
|
||||||
|
const verboseLogsInfo = (message:string) => {
|
||||||
if (options.verbose) {
|
if (options.verbose) {
|
||||||
themeLogger.info(c.bold(c.green("Provider Setup Complete")));
|
themeLogger.info(message);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
verboseLogsInfo(c.bold(c.green("Provider Setup Complete")));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue