mm_machine 2.0.9 → 2.1.1
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.
- package/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -210,14 +210,14 @@ Index.prototype.updateConfigAll = async function(searchPath, accurate) {
|
|
|
210
210
|
// 处理找到的目录
|
|
211
211
|
for (const f of list_scope) {
|
|
212
212
|
// 直接检查并加载demo.json文件
|
|
213
|
-
const config_file =
|
|
213
|
+
const config_file = `./${this.type}.json`.fullname(f);
|
|
214
214
|
if (config_file && config_file.hasFile && config_file.hasFile()) {
|
|
215
215
|
// 直接加载这个文件
|
|
216
216
|
await this.loadFile(config_file, true);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
// 同时也检查config_demo.json文件
|
|
220
|
-
const config_file2 =
|
|
220
|
+
const config_file2 = `./config_${this.type}.json`.fullname(f);
|
|
221
221
|
if (config_file2 && config_file2.hasFile && config_file2.hasFile()) {
|
|
222
222
|
// 直接加载这个文件
|
|
223
223
|
await this.loadFile(config_file2, true);
|
|
@@ -245,10 +245,10 @@ Index.prototype.updateConfigHave = async function(dir) {
|
|
|
245
245
|
// 使用find方法查找匹配项
|
|
246
246
|
const targetConfig = config.find(cg => cg.name === o.config.name);
|
|
247
247
|
if (targetConfig) {
|
|
248
|
-
await o.exec('
|
|
248
|
+
await o.exec('setConfig', targetConfig);
|
|
249
249
|
}
|
|
250
250
|
} else {
|
|
251
|
-
await o.exec('
|
|
251
|
+
await o.exec('setConfig', config);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
} catch (err) {
|