Merge pull request #1734 from thelounge/astorije/thelounge_home

Switch default home location to `~/.thelounge`
This commit is contained in:
Pavel Djundik 2018-02-19 20:54:57 +02:00 committed by GitHub
commit 6c7ddd0f47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 6 additions and 22 deletions

View File

@ -1 +1 @@
~/.lounge
~/.thelounge

View File

@ -25,28 +25,12 @@ class Utils {
return home;
}
let distConfig;
// TODO: Remove this section when releasing The Lounge v3
const deprecatedDistConfig = path.resolve(path.join(
const distConfig = path.resolve(path.join(
__dirname,
"..",
"..",
".lounge_home"
".thelounge_home"
));
if (fs.existsSync(deprecatedDistConfig)) {
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.`);
distConfig = deprecatedDistConfig;
} else {
distConfig = path.resolve(path.join(
__dirname,
"..",
"..",
".thelounge_home"
));
}
home = fs.readFileSync(distConfig, "utf-8").trim();

View File

@ -1,5 +1,5 @@
# Files that may be generated by tests
.lounge/storage/
.thelounge/storage/
# Fixtures contain fake packages, stored in a fake node_modules folder
!.lounge/packages/node_modules/
!.thelounge/packages/node_modules/

View File

@ -2,5 +2,5 @@
global.log = require("../../src/log.js");
const home = require("path").join(__dirname, ".lounge");
const home = require("path").join(__dirname, ".thelounge");
require("../../src/helper").setHome(home);