Color all references to deprecations in bold red

This commit is contained in:
Jérémie Astori 2017-12-10 16:07:23 -05:00
parent 07a01b0547
commit 6547d18e7f
No known key found for this signature in database
GPG key ID: B9A4F245CD67BDE8
3 changed files with 7 additions and 7 deletions

View file

@ -11,12 +11,12 @@ const Helper = require("../helper");
const Utils = require("./utils"); const Utils = require("./utils");
if (require("semver").lt(process.version, "6.0.0")) { if (require("semver").lt(process.version, "6.0.0")) {
log.warn(`Support of Node.js v4 is ${colors.bold("deprecated")} and will be removed in The Lounge v3.`); log.warn(`Support of Node.js v4 is ${colors.bold.red("deprecated")} and will be removed in The Lounge v3.`);
log.warn("Please upgrade to Node.js v6 or more recent."); log.warn("Please upgrade to Node.js v6 or more recent.");
} }
program.version(Helper.getVersion(), "-v, --version") program.version(Helper.getVersion(), "-v, --version")
.option("--home <path>", `${colors.bold("[DEPRECATED]")} Use the ${colors.green("THELOUNGE_HOME")} environment variable instead.`) .option("--home <path>", `${colors.bold.red("[DEPRECATED]")} Use the ${colors.green("THELOUNGE_HOME")} environment variable instead.`)
.option( .option(
"-c, --config <key=value>", "-c, --config <key=value>",
"override entries of the configuration file, must be specified for each entry that needs to be overriden", "override entries of the configuration file, must be specified for each entry that needs to be overriden",
@ -26,7 +26,7 @@ program.version(Helper.getVersion(), "-v, --version")
.parseOptions(process.argv); .parseOptions(process.argv);
if (program.home) { if (program.home) {
log.warn(`${colors.green("--home")} is ${colors.bold("deprecated")} and will be removed in The Lounge v3.`); log.warn(`${colors.green("--home")} is ${colors.bold.red("deprecated")} and will be removed in The Lounge v3.`);
log.warn(`Use the ${colors.green("THELOUNGE_HOME")} environment variable instead.`); log.warn(`Use the ${colors.green("THELOUNGE_HOME")} environment variable instead.`);
} }
@ -43,7 +43,7 @@ if (!fs.existsSync(path.join(
} }
if (process.env.LOUNGE_HOME) { if (process.env.LOUNGE_HOME) {
log.warn(`${colors.green("LOUNGE_HOME")} is ${colors.bold("deprecated")} and will be removed in The Lounge v3.`); log.warn(`${colors.green("LOUNGE_HOME")} is ${colors.bold.red("deprecated")} and will be removed in The Lounge v3.`);
log.warn(`Use ${colors.green("THELOUNGE_HOME")} instead.`); log.warn(`Use ${colors.green("THELOUNGE_HOME")} instead.`);
} }
@ -67,7 +67,7 @@ require("./install");
// TODO: Remove this when releasing The Lounge v3 // TODO: Remove this when releasing The Lounge v3
if (process.argv[1].endsWith(`${require("path").sep}lounge`)) { if (process.argv[1].endsWith(`${require("path").sep}lounge`)) {
log.warn(`The ${colors.red("lounge")} CLI is ${colors.bold("deprecated")} and will be removed in v3.`); log.warn(`The ${colors.red("lounge")} CLI is ${colors.bold.red("deprecated")} and will be removed in v3.`);
log.warn(`Use ${colors.green("thelounge")} instead.`); log.warn(`Use ${colors.green("thelounge")} instead.`);
process.argv[1] = "thelounge"; process.argv[1] = "thelounge";
} }

View file

@ -35,7 +35,7 @@ class Utils {
".lounge_home" ".lounge_home"
)); ));
if (fs.existsSync(deprecatedDistConfig)) { if (fs.existsSync(deprecatedDistConfig)) {
log.warn(`${colors.green(".lounge_home")} is ${colors.bold("deprecated")} and will be ignored as of The Lounge v3.`); log.warn(`${colors.green(".lounge_home")} is ${colors.bold.red("deprecated")} and will be ignored as of The Lounge v3.`);
log.warn(`Use ${colors.green(".thelounge_home")} instead.`); log.warn(`Use ${colors.green(".thelounge_home")} instead.`);
distConfig = deprecatedDistConfig; distConfig = deprecatedDistConfig;

View file

@ -109,7 +109,7 @@ function setHome(newPath) {
// TODO: Remove in future release // TODO: Remove in future release
// Backwards compatibility for old way of specifying themes in settings // Backwards compatibility for old way of specifying themes in settings
if (this.config.theme.includes(".css")) { if (this.config.theme.includes(".css")) {
log.warn(`Referring to CSS files in the ${colors.green("theme")} setting of ${colors.green(configPath)} is ${colors.bold("deprecated")} and will be removed in a future version.`); log.warn(`Referring to CSS files in the ${colors.green("theme")} setting of ${colors.green(configPath)} is ${colors.bold.red("deprecated")} and will be removed in a future version.`);
} else { } else {
this.config.theme = `themes/${this.config.theme}.css`; this.config.theme = `themes/${this.config.theme}.css`;
} }