From 5dfd470170765d4724ba29d687762f3b8e243072 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 25 Aug 2016 01:58:50 +0300 Subject: [PATCH] preparing to move object/actions/features to their own libs... Signed-off-by: Alex A. Naanou --- ui (gen4)/ig.js | 8 ++++++++ ui (gen4)/lib/actions.js | 10 +++++++--- ui (gen4)/lib/features.js | 6 +++++- ui (gen4)/lib/object.js | 5 +++++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/ig.js b/ui (gen4)/ig.js index e275698f..2dd479d4 100644 --- a/ui (gen4)/ig.js +++ b/ui (gen4)/ig.js @@ -15,6 +15,14 @@ requirejs.config({ // XXX this does not work on direct filesystem access... //urlArgs: 'bust='+Date.now(), + + /* + paths: { + 'lib/object': 'node_modules/ig-object', + 'ig-object': 'node_modules/ig-object', + 'object': 'node_modules/ig-object', + }, + //*/ }) var _require = require require = requirejs diff --git a/ui (gen4)/lib/actions.js b/ui (gen4)/lib/actions.js index e05619fa..c2afe8c1 100755 --- a/ui (gen4)/lib/actions.js +++ b/ui (gen4)/lib/actions.js @@ -7,6 +7,10 @@ (function(require){ var module={} // make module AMD/node compatible... /*********************************************************************/ +// XXX +// XXX replace this with ig-features/actions +// XXX + var args2array = require('lib/util').args2array var object = require('lib/object') @@ -962,7 +966,7 @@ module.MetaActions = { // NOTE: if 'all' is set them mixin all the actions available, // otherwise only mixin local actions... // NOTE: this will override existing own attributes. - inlineMmixin: function(from, all, descriptors, all_attr_types){ + inlineMixin: function(from, all, descriptors, all_attr_types){ // defaults... descriptors = descriptors || true all_attr_types = all_attr_types || false @@ -1007,14 +1011,14 @@ module.MetaActions = { return this }, - // Same as .inlineMmixin(..) but isolates a mixin in a seporate object + // Same as .inlineMixin(..) but isolates a mixin in a seporate object // in the inheritance chain... // mixin: function(from, all, descriptors, all_attr_types){ var proto = Object.create(this.__proto__) // mixinto an empty object - proto.inlineMmixin(from, all, descriptors, all_attr_types) + proto.inlineMixin(from, all, descriptors, all_attr_types) // mark the mixin for simpler removal... proto.__mixin_source = from diff --git a/ui (gen4)/lib/features.js b/ui (gen4)/lib/features.js index 6c432da4..b9fa94a1 100755 --- a/ui (gen4)/lib/features.js +++ b/ui (gen4)/lib/features.js @@ -7,10 +7,14 @@ (function(require){ var module={} // make module AMD/node compatible... /*********************************************************************/ +// XXX +// XXX replace this with ig-features +// XXX + var args2array = require('lib/util').args2array -var actions = require('lib/actions') var object = require('lib/object') +var actions = module.actions = require('lib/actions') diff --git a/ui (gen4)/lib/object.js b/ui (gen4)/lib/object.js index aa493659..5f747821 100755 --- a/ui (gen4)/lib/object.js +++ b/ui (gen4)/lib/object.js @@ -7,6 +7,11 @@ (function(require){ var module={} // make module AMD/node compatible... /*********************************************************************/ +return require('../node_modules/ig-object/object') + +// XXX +// XXX replace this with ig-object +// XXX /*********************************************************************/