Comparing version 0.3.5 to 0.3.6
@@ -88,25 +88,2 @@ "use strict"; | ||
case 6: | ||
_context.next = 8; | ||
return Object.keys(cp).forEach(function (_key) { | ||
if (!_key.startsWith("_")) { | ||
var hook = _["hooks"][_key]; | ||
if (Array.isArray(hook)) { | ||
hook.forEach(function (h) { | ||
(0, _utils.bindHook)({ hook: h, _key: _key, cp: cp }); | ||
}); | ||
} else { | ||
(0, _utils.bindHook)({ hook: hook, _key: _key, cp: cp }); | ||
} | ||
} | ||
}); | ||
case 8: | ||
lifeCycle.forEach(function (key) { | ||
if (!key.startsWith("_")) { | ||
cp[key] && cp[key](); | ||
} | ||
}); | ||
case 9: | ||
case "end": | ||
@@ -141,2 +118,52 @@ return _context.stop(); | ||
} | ||
}, { | ||
key: "$go", | ||
value: function $go() { | ||
var _this2 = this; | ||
var _ = this; | ||
var _$config$lifeCycle2 = _.config.lifeCycle, | ||
lifeCycle = _$config$lifeCycle2 === undefined ? [] : _$config$lifeCycle2; | ||
Object.values(this.components).forEach(function () { | ||
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(cp) { | ||
return regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return Object.keys(cp).forEach(function (_key) { | ||
if (!_key.startsWith("_")) { | ||
var hook = _["hooks"][_key]; | ||
if (Array.isArray(hook)) { | ||
hook.forEach(function (h) { | ||
(0, _utils.bindHook)({ hook: h, _key: _key, cp: cp }); | ||
}); | ||
} else { | ||
(0, _utils.bindHook)({ hook: hook, _key: _key, cp: cp }); | ||
} | ||
} | ||
}); | ||
case 2: | ||
lifeCycle.forEach(function (key) { | ||
if (!key.startsWith("_")) { | ||
cp[key] && cp[key](); | ||
} | ||
}); | ||
case 3: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}, _callee2, _this2); | ||
})); | ||
return function (_x2) { | ||
return _ref4.apply(this, arguments); | ||
}; | ||
}()); | ||
} | ||
}]); | ||
@@ -143,0 +170,0 @@ |
{ | ||
"name": "menhera", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"main": "dist", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -68,5 +68,7 @@ # Menhera | ||
} | ||
}).$mount({ | ||
3: [cliTest] | ||
}); | ||
}) | ||
.$mount({ | ||
3: [cliTest] | ||
}) | ||
.$go(); | ||
``` |
16677
330
74