Merge pull request #1708 from thelounge/astorije/thelounge

Switch CLI tool from `lounge` to `thelounge`, deprecate `lounge`
This commit is contained in:
Pavel Djundik 2017-11-27 13:58:46 +02:00 committed by GitHub
commit ba002cca64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 6 deletions

View File

@ -40,13 +40,13 @@ Run this in a terminal to install (or upgrade) the latest stable release from
When installation is complete, run: When installation is complete, run:
```sh ```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: For more information, read the [documentation](https://thelounge.github.io/docs/), [wiki](https://github.com/thelounge/lounge/wiki), or run:
```sh ```sh
lounge --help thelounge --help
``` ```
### Running from source ### Running from source
@ -61,7 +61,7 @@ NODE_ENV=production npm run build
npm start npm start
``` ```
When installed like this, npm doesn't create a `lounge` executable. Use `npm start -- <command>` to run subcommands. When installed like this, npm doesn't create a `thelounge` executable. Use `npm start -- <command>` to run subcommands.
⚠️ While it is the most recent codebase, this is not production-ready! Run at ⚠️ 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. your own risk. It is also not recommended to run this as root.

View File

@ -4,7 +4,8 @@
"version": "2.6.0", "version": "2.6.0",
"preferGlobal": true, "preferGlobal": true,
"bin": { "bin": {
"lounge": "index.js" "lounge": "index.js",
"thelounge": "index.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -35,7 +35,7 @@ ClientManager.prototype.findClient = function(name) {
ClientManager.prototype.autoloadUsers = function() { ClientManager.prototype.autoloadUsers = function() {
const users = this.getUsers(); const users = this.getUsers();
const noUsersWarning = `There are currently no users. Create one with ${colors.bold("lounge add <name>")}.`; const noUsersWarning = `There are currently no users. Create one with ${colors.bold("thelounge add <name>")}.`;
if (users.length === 0) { if (users.length === 0) {
log.info(noUsersWarning); log.info(noUsersWarning);

View File

@ -58,6 +58,13 @@ require("./reset");
require("./edit"); require("./edit");
require("./install"); 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); program.parse(process.argv);
if (!program.args.length) { if (!program.args.length) {

View File

@ -34,6 +34,6 @@ program
log.info(`${i + 1}. ${colors.bold(user)}`); log.info(`${i + 1}. ${colors.bold(user)}`);
}); });
} else { } else {
log.info(`There are currently no users. Create one with ${colors.bold("lounge add <name>")}.`); log.info(`There are currently no users. Create one with ${colors.bold("thelounge add <name>")}.`);
} }
}); });