mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
调整SysCfg json的保存文件名
This commit is contained in:
parent
eda003ee74
commit
f34509a72d
@ -4,14 +4,14 @@ import lodash from "lodash";
|
|||||||
const _path = process.cwd();
|
const _path = process.cwd();
|
||||||
const _cfgPath = `${_path}/plugins/miao-plugin/components/`;
|
const _cfgPath = `${_path}/plugins/miao-plugin/components/`;
|
||||||
let cfg = {};
|
let cfg = {};
|
||||||
|
console.log(cfg);
|
||||||
if (!fs.existsSync(_cfgPath)) {
|
if (!fs.existsSync(_cfgPath)) {
|
||||||
fs.mkdirSync(_cfgPath);
|
fs.mkdirSync(_cfgPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (fs.existsSync(_cfgPath + "cfg.json")) {
|
if (fs.existsSync(_cfgPath + "cfg.json")) {
|
||||||
cfg = JSON.parse(fs.readFileSync(_cfgPath + "miao-plugin.json", "utf8")) || {};
|
cfg = JSON.parse(fs.readFileSync(_cfgPath + "cfg.json", "utf8")) || {};
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// do nth
|
// do nth
|
||||||
|
Loading…
Reference in New Issue
Block a user