@makano/rew 1.2.84 → 1.2.85

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,3 @@
1
1
  Function.prototype.wait = function(...args) {
2
2
  return wait(this, ...args);
3
- };
4
- Function.prototype.globe = () => global
3
+ };
@@ -69,6 +69,7 @@ class Namespace extends module.exports.Usage {
69
69
  if(ns instanceof Namespace.Group){
70
70
  if(ns.onUse) this.onUse = ns.onUse;
71
71
  if(ns.parent) parent = ns.parent;
72
+ if(ns.onAfterUse) this.onAfterUse = ns.onAfterUse;
72
73
  cb = ns.g[1]
73
74
  ns = ns.g[0]
74
75
  }
@@ -128,8 +128,10 @@ module.exports.prepareContext = function (
128
128
  childContext.currentNamespace = name.namespace;
129
129
  childContext.parentNamespace = parentContext;
130
130
  const code = `(${trigger.toString()})()`;
131
- if(name.onUse) name.onUse();
132
- return runtime.exec(code, childContext, code, context.module.filepath);
131
+ if(name.onUse) name.onUse();
132
+ const r = runtime.exec(code, childContext, code, context.module.filepath);
133
+ if(name.onAfterUse) name.onAfterUse();
134
+ return r;
133
135
  } else if(name instanceof Usage) {
134
136
  const v = name.trigger(...params) || true;
135
137
  if(name.save !== false) context.__using__[name.name] = v;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makano/rew",
3
- "version": "1.2.84",
3
+ "version": "1.2.85",
4
4
  "description": "A simple coffescript runtime and app manager",
5
5
  "main": "main.js",
6
6
  "directories": {