From 648493c6c241efa6386f0f99914e85f1fb3814e7 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 12 Sep 2017 05:11:31 +0300 Subject: [PATCH] docs... Signed-off-by: Alex A. Naanou --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/README.md b/README.md index 0ca23eb..8c9e303 100644 --- a/README.md +++ b/README.md @@ -279,6 +279,17 @@ action_set.on('action_name.pre', function(){ argument succeeded by the action arguments. +**Alias** + +- an action created by `Alias(..)`, +- identical to an action with one key difference: instead of a + function `Alias(..)` expects a string/code, +- code syntax is configurable, defaulting to the defined by + `parseActionCall(..)`, +- aliases are designed to be defined and managed in runtime while + actions are mainly load-time entities. + + ### The action system main protocols: @@ -449,6 +460,59 @@ _action_ is build-in. an overhead on all the actions if not done carefully. +4. Action attributes + + XXX + + + +### Alias protocols: + +1. Defining aliases in runtime (MetaActions) + + ``` + .alias('alias', 'action: args') + .alias('alias', .., 'action: args') + -> + ``` + + To enable extending in runtime .alias(..) itself is implemented as + an action, thus all action protocols also apply. + + **Notes:** + - .alias(..) is signature compatible to Action(..) / Alias(..), + supporting all the documentation and attribute definition. + + +2. Deleting aliases in runtime (MetaActions) + + ``` + .alias('alias', null) + .alias('alias', false) + -> + ``` + + **Notes:** + - only own aliases can be deleted via .alias(.., null|false) + + +3. Documentation generation and introspection (MetaActions, Alias) + + Alias code... + ``` + .alias + .toString() + -> + ``` + + List own aliases... + ``` + .aliases + -> + ``` + + + XXX need docs on mix(..) and .mix*(..) protocols...