style(configs): 格式化 JSON 配置文件

- 使用缩进格式化 CircleLevel.json 和 CrossServerGroupConf.json 文件
- 提高代码可读性和维护性
- 为 json2lua.js 脚本添加 CircleLevel.json 处理
This commit is contained in:
2025-01-10 22:46:09 +08:00
parent a07c759385
commit cd9360923a
3 changed files with 765 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1 +1,22 @@
{"7":{"id":7,"ruleid":104},"24":{"id":24,"ruleid":105},"49":{"id":49,"ruleid":106},"84":{"id":84,"ruleid":107},"10000":{"id":10000,"ruleid":108}}
{
"7": {
"id": 7,
"ruleid": 104
},
"24": {
"id": 24,
"ruleid": 105
},
"49": {
"id": 49,
"ruleid": 106
},
"84": {
"id": 84,
"ruleid": 107
},
"10000": {
"id": 10000,
"ruleid": 108
}
}

View File

@@ -42,7 +42,7 @@ const start = () => {
const files = fs.readdirSync(folderPath);
// 过滤出所有的 JSON 文件
const jsonFiles = files.filter(file => path.extname(file) === '.json').filter(file => ["StdItems"].map(e => `${e}.json`).includes(file));
const jsonFiles = files.filter(file => path.extname(file) === '.json').filter(file => ["StdItems","CircleLevel"].map(e => `${e}.json`).includes(file));
jsonFiles.forEach(file => {
const json = JSON.parse(fs.readFileSync(path.join(folderPath, file), 'utf8'))
const filename = path.basename(file, path.extname(file));