*Update dist
This commit is contained in:
parent
6e0608c9a9
commit
17a434f400
|
@ -17,6 +17,7 @@ export default class Config {
|
||||||
openDir(dir: string): void;
|
openDir(dir: string): void;
|
||||||
open(file: string): void;
|
open(file: string): void;
|
||||||
save(file: string, data: object): void;
|
save(file: string, data: object): void;
|
||||||
|
savePath(file: string, path: string): void;
|
||||||
set(key: string, value: any): void;
|
set(key: string, value: any): void;
|
||||||
has(key: string): any;
|
has(key: string): any;
|
||||||
private normalize;
|
private normalize;
|
||||||
|
|
|
@ -89,6 +89,9 @@ class Config {
|
||||||
fs_1.default.writeFileSync(fullPath, JSON.stringify(data));
|
fs_1.default.writeFileSync(fullPath, JSON.stringify(data));
|
||||||
this.open(fullPath);
|
this.open(fullPath);
|
||||||
}
|
}
|
||||||
|
savePath(file, path) {
|
||||||
|
this.save(file, this.get(path));
|
||||||
|
}
|
||||||
set(key, value) {
|
set(key, value) {
|
||||||
(0, bsert_1.default)(typeof key === "string", "Key must be a string.");
|
(0, bsert_1.default)(typeof key === "string", "Key must be a string.");
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
|
Loading…
Reference in New Issue