Closed twolfson closed 11 years ago
We have failing tests on dev/implement.complex.global.hooks
to resume later.
When we break out the new module, I want to flatten all expanded hooks into one function and make all hooks into objects, so that renderBatch
can be super-simple.
Make sure that this new module uses flat files
as its test suite.
When this breakout happens, open an issue to nuke proxies
from object-fusion2
.
The new module will take the content
object and expand
, alias
, and flatten
all values recursively.
The new order for doubleshot
:
Expand
/alias
/flatten
key
into its own object and functiondescribe
, before
, it
, etc.To re-iterate, the flattened function, will has the async.forEachSeries
logic if it is an array. See renderBatch
if you have forgotten what I am talking about.
Module names
Started this here https://github.com/twolfson/object-mapper
Completed in 2.8.0
.
Currently, due to a design flaw, we either have to hack with the global variable or break up
object-fusion2
into a fuser module and an expansion/alias module.The issue is that the global hooks need to handle expansion just like everyone else but nobody uses them as
description
s in their outlines (for obvious reasons). We could hackishly add the temporary description but it gets ugly fast when pulling that out.The proper abstraction is to make the expansion of
content
something we can do without the fusing step.Bonus features of this:
before
can use another method in its expansionbefore
in its expansionIf we get it right, then in #13 we can call
before
as a method. crazy.