mm_machine 2.2.2 → 2.2.3
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/item.js +8 -1
- package/package.json +1 -1
package/item.js
CHANGED
|
@@ -351,6 +351,13 @@ Item.prototype.newConfig = function (file) {
|
|
|
351
351
|
this._createConfigFile(file, this.config, this.dir_base);
|
|
352
352
|
};
|
|
353
353
|
|
|
354
|
+
/**
|
|
355
|
+
* 创建配置文件
|
|
356
|
+
* @param {string} file 目标文件路径
|
|
357
|
+
* @param {object} model 配置模型对象
|
|
358
|
+
* @param {string} tpl_dir 模板文件路径
|
|
359
|
+
* @returns {string} 配置文件内容
|
|
360
|
+
*/
|
|
354
361
|
Item.prototype._createConfigFile = function (file, model = {}, tpl_dir = '') {
|
|
355
362
|
var tpl = this.getConfigTpl(tpl_dir);
|
|
356
363
|
var content = $.tpl.render(tpl, model);
|
|
@@ -534,7 +541,7 @@ Item.prototype._removeConfigFile = function (file, name) {
|
|
|
534
541
|
* @param {string} name 配置名称
|
|
535
542
|
* @returns {string | null} 错误消息
|
|
536
543
|
*/
|
|
537
|
-
Item.prototype.
|
|
544
|
+
Item.prototype._removeArray = function (file, config, name) {
|
|
538
545
|
let index = config.findIndex((item) => item.name === name);
|
|
539
546
|
if (index === -1) return null;
|
|
540
547
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_machine",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "A flexible Node.js plugin mechanism system for dynamic loading, management and execution of modules. Supports hot reload, lifecycle management, and modern JavaScript features.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|