Skip to content

Commit 2d86f21

Browse files
committed
remove xdg-basedir
1 parent 007b44b commit 2d86f21

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

package-lock.json

Lines changed: 18 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"colors": "^1.4.0",
4242
"commander": "^14.0.0",
4343
"csv-string": "^4.1.1",
44+
"env-paths": "^3.0.0",
4445
"find-in-files": "^0.5.0",
4546
"hash-sum": "^2.0.0",
4647
"hashids": "^2.3.0",
@@ -60,7 +61,6 @@
6061
"tempfile": "^5.0.0",
6162
"throttled-queue": "^2.1.4",
6263
"underscore": "^1.13.7",
63-
"xdg-basedir": "^5.1.0",
6464
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
6565
},
6666
"devDependencies": {

src/include/file-config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ import fs from 'fs';
22
import shell from 'shelljs';
33
import path from 'path';
44
import os from 'os';
5-
import {xdgData} from 'xdg-basedir';
65
import config from './config.js';
76
import yaml from 'read-yaml';
87
import hash from 'hash-sum';
98
import Fs from './filesystem.js';
9+
import envPaths from 'env-paths';
10+
1011

1112
/**
1213
* file config with local and global configuration files
@@ -18,7 +19,6 @@ class fileConfig extends config {
1819
*/
1920
constructor(workDir) {
2021
super();
21-
2222
this.assertGlobalConfig();
2323
this.workDir = workDir;
2424
this.data = Object.assign(this.data, this.localExists() ? this.parseLocal() : this.parseGlobal());
@@ -135,7 +135,7 @@ class fileConfig extends config {
135135
}
136136

137137
get globalDir() {
138-
return Fs.join(xdgData, '.gtt');
138+
return envPaths(".gtt", {suffix:""}).data;
139139
}
140140

141141
get frameDir() {

0 commit comments

Comments
 (0)