From aca23257edbe5d6878e34b101aaafcc4519ee68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sun, 12 Nov 2017 15:49:04 -0500 Subject: [PATCH] Switch CLI tool from `lounge` to `thelounge` and deprecate `lounge` This is in preparation of The Lounge v3 which will make `thelounge` uniform across the entire project. No more confusion! --- README.md | 6 +++--- package.json | 3 ++- src/clientManager.js | 2 +- src/command-line/index.js | 7 +++++++ src/command-line/list.js | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 27b4cf49..cb21c2c3 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,13 @@ Run this in a terminal to install (or upgrade) the latest stable release from When installation is complete, run: ```sh -lounge start +thelounge start ``` For more information, read the [documentation](https://thelounge.github.io/docs/), [wiki](https://github.com/thelounge/lounge/wiki), or run: ```sh -lounge --help +thelounge --help ``` ### Running from source @@ -61,7 +61,7 @@ NODE_ENV=production npm run build npm start ``` -When installed like this, npm doesn't create a `lounge` executable. Use `npm start -- ` to run subcommands. +When installed like this, npm doesn't create a `thelounge` executable. Use `npm start -- ` to run subcommands. ⚠️ While it is the most recent codebase, this is not production-ready! Run at your own risk. It is also not recommended to run this as root. diff --git a/package.json b/package.json index 4a708b30..38fe022e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "version": "2.6.0", "preferGlobal": true, "bin": { - "lounge": "index.js" + "lounge": "index.js", + "thelounge": "index.js" }, "repository": { "type": "git", diff --git a/src/clientManager.js b/src/clientManager.js index a203004a..ea0b1365 100644 --- a/src/clientManager.js +++ b/src/clientManager.js @@ -35,7 +35,7 @@ ClientManager.prototype.findClient = function(name) { ClientManager.prototype.autoloadUsers = function() { const users = this.getUsers(); - const noUsersWarning = `There are currently no users. Create one with ${colors.bold("lounge add ")}.`; + const noUsersWarning = `There are currently no users. Create one with ${colors.bold("thelounge add ")}.`; if (users.length === 0) { log.info(noUsersWarning); diff --git a/src/command-line/index.js b/src/command-line/index.js index 44170481..fca28f8c 100644 --- a/src/command-line/index.js +++ b/src/command-line/index.js @@ -39,6 +39,13 @@ require("./reset"); require("./edit"); require("./install"); +// TODO: Remove this when releasing The Lounge v3 +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(`Use ${colors.green("thelounge")} instead.`); + process.argv[1] = "thelounge"; +} + program.parse(process.argv); if (!program.args.length) { diff --git a/src/command-line/list.js b/src/command-line/list.js index d092ad8b..07c60528 100644 --- a/src/command-line/list.js +++ b/src/command-line/list.js @@ -34,6 +34,6 @@ program log.info(`${i + 1}. ${colors.bold(user)}`); }); } else { - log.info(`There are currently no users. Create one with ${colors.bold("lounge add ")}.`); + log.info(`There are currently no users. Create one with ${colors.bold("thelounge add ")}.`); } });