*Update dist
This commit is contained in:
parent
6e37b22988
commit
8e5b9d2bc6
|
@ -134,9 +134,10 @@ class Config {
|
||||||
saveConfigJson(file, data) {
|
saveConfigJson(file, data) {
|
||||||
(0, bsert_1.default)(typeof data === "object");
|
(0, bsert_1.default)(typeof data === "object");
|
||||||
(0, bsert_1.default)(!Array.isArray(data));
|
(0, bsert_1.default)(!Array.isArray(data));
|
||||||
const fullPath = path_1.default.join(this.str("configdir"), file);
|
const configDir = this.str("configdir");
|
||||||
if (!fs_1.default.existsSync(fullPath)) {
|
const fullPath = path_1.default.join(configDir, file);
|
||||||
fs_1.default.mkdirSync(fullPath, { recursive: true });
|
if (!fs_1.default.existsSync(configDir)) {
|
||||||
|
fs_1.default.mkdirSync(configDir, { recursive: true });
|
||||||
}
|
}
|
||||||
fs_1.default.writeFileSync(fullPath, JSON.stringify(data));
|
fs_1.default.writeFileSync(fullPath, JSON.stringify(data));
|
||||||
this.openJson(fullPath);
|
this.openJson(fullPath);
|
||||||
|
|
Loading…
Reference in New Issue