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!
This commit is contained in:
Jérémie Astori 2017-11-12 15:49:04 -05:00
parent f2d9ef62cf
commit aca23257ed
No known key found for this signature in database
GPG key ID: B9A4F245CD67BDE8
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:
```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 -- <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
your own risk. It is also not recommended to run this as root.

View file

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

View file

@ -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 <name>")}.`;
const noUsersWarning = `There are currently no users. Create one with ${colors.bold("thelounge add <name>")}.`;
if (users.length === 0) {
log.info(noUsersWarning);

View file

@ -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) {

View file

@ -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 <name>")}.`);
log.info(`There are currently no users. Create one with ${colors.bold("thelounge add <name>")}.`);
}
});