fast-cocos 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -565,6 +565,7 @@ class XlsxParser {
|
|
|
565
565
|
* 合并JSON文件
|
|
566
566
|
*/
|
|
567
567
|
mergeJson() {
|
|
568
|
+
var _a;
|
|
568
569
|
const jsonDir = path_1.default.join(this.options.tmpDir);
|
|
569
570
|
const files = this.findFilesWithExtensions(jsonDir, [".json"]);
|
|
570
571
|
const json = {};
|
|
@@ -577,6 +578,8 @@ class XlsxParser {
|
|
|
577
578
|
}
|
|
578
579
|
json[sheetName] = require(filePath);
|
|
579
580
|
});
|
|
581
|
+
// 写入版本,源目录的最后一个目录以v开头的字符串,如果不是则默认为v1
|
|
582
|
+
json.version = ((_a = path_1.default.basename(this.options.xlsxDir).match(/^v\d+$/)) === null || _a === void 0 ? void 0 : _a[0]) || "v1";
|
|
580
583
|
this.writeFileSync(this.options["xlsx.json"], json);
|
|
581
584
|
const tmpJsonPath = path_1.default.join(this.options.xlsxDir, "config", "xlsx.json");
|
|
582
585
|
this.writeFileSync(tmpJsonPath, json);
|