mm_config 2.3.4 → 2.3.5

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.
Files changed (2) hide show
  1. package/index.js +9 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -238,6 +238,15 @@ Config.prototype.destroy = function () {
238
238
  delete dict[this.config.file];
239
239
  };
240
240
 
241
+ /**
242
+ * 从配置文件加载配置
243
+ * @returns {boolean} 加载是否成功
244
+ */
245
+ Config.prototype.load = function () {
246
+ if (!this.config.file) return false;
247
+ this.options = this.config.file.loadJson() || {};
248
+ };
249
+
241
250
  /**
242
251
  * 创建配置(同步)
243
252
  * @param {string} file - 配置文件路径
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_config",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "Super Meimei Configuration Synchronizer - Automatically sync configuration changes to JSON files",
5
5
  "main": "index.js",
6
6
  "scripts": {