preparing to move object/actions/features to their own libs...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-08-25 01:58:50 +03:00
parent 6a9ad3ba15
commit 5dfd470170
4 changed files with 25 additions and 4 deletions

View File

@ -15,6 +15,14 @@ requirejs.config({
// XXX this does not work on direct filesystem access... // XXX this does not work on direct filesystem access...
//urlArgs: 'bust='+Date.now(), //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 var _require = require
require = requirejs require = requirejs

View File

@ -7,6 +7,10 @@
(function(require){ var module={} // make module AMD/node compatible... (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 args2array = require('lib/util').args2array
var object = require('lib/object') var object = require('lib/object')
@ -962,7 +966,7 @@ module.MetaActions = {
// NOTE: if 'all' is set them mixin all the actions available, // NOTE: if 'all' is set them mixin all the actions available,
// otherwise only mixin local actions... // otherwise only mixin local actions...
// NOTE: this will override existing own attributes. // NOTE: this will override existing own attributes.
inlineMmixin: function(from, all, descriptors, all_attr_types){ inlineMixin: function(from, all, descriptors, all_attr_types){
// defaults... // defaults...
descriptors = descriptors || true descriptors = descriptors || true
all_attr_types = all_attr_types || false all_attr_types = all_attr_types || false
@ -1007,14 +1011,14 @@ module.MetaActions = {
return this 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... // in the inheritance chain...
// //
mixin: function(from, all, descriptors, all_attr_types){ mixin: function(from, all, descriptors, all_attr_types){
var proto = Object.create(this.__proto__) var proto = Object.create(this.__proto__)
// mixinto an empty object // 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... // mark the mixin for simpler removal...
proto.__mixin_source = from proto.__mixin_source = from

View File

@ -7,10 +7,14 @@
(function(require){ var module={} // make module AMD/node compatible... (function(require){ var module={} // make module AMD/node compatible...
/*********************************************************************/ /*********************************************************************/
// XXX
// XXX replace this with ig-features
// XXX
var args2array = require('lib/util').args2array var args2array = require('lib/util').args2array
var actions = require('lib/actions')
var object = require('lib/object') var object = require('lib/object')
var actions = module.actions = require('lib/actions')

View File

@ -7,6 +7,11 @@
(function(require){ var module={} // make module AMD/node compatible... (function(require){ var module={} // make module AMD/node compatible...
/*********************************************************************/ /*********************************************************************/
return require('../node_modules/ig-object/object')
// XXX
// XXX replace this with ig-object
// XXX
/*********************************************************************/ /*********************************************************************/