Browse Source

Switch default home location to `~/.thelounge` and remove support of `.lounge_home`

pull/1734/head
Pavel Djundik 3 years ago
parent
commit
51684f7a2a
  1. 2
      .thelounge_home
  2. 20
      src/command-line/utils.js
  3. 4
      test/fixtures/.gitignore
  4. 0
      test/fixtures/.thelounge/config.js
  5. 0
      test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/index.js
  6. 0
      test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/package.json
  7. 0
      test/fixtures/.thelounge/packages/package.json
  8. 0
      test/fixtures/.thelounge/vapid.json
  9. 2
      test/fixtures/env.js

2
.thelounge_home

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

20
src/command-line/utils.js

@ -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();

4
test/fixtures/.gitignore

@ -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/

0
test/fixtures/.lounge/config.js → test/fixtures/.thelounge/config.js

0
test/fixtures/.lounge/packages/node_modules/thelounge-package-foo/index.js → test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/index.js

0
test/fixtures/.lounge/packages/node_modules/thelounge-package-foo/package.json → test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/package.json

0
test/fixtures/.lounge/packages/package.json → test/fixtures/.thelounge/packages/package.json

0
test/fixtures/.lounge/vapid.json → test/fixtures/.thelounge/vapid.json

2
test/fixtures/env.js

@ -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);
Loading…
Cancel
Save