mirror of
https://github.com/flynx/actions.js.git
synced 2025-10-29 10:20:09 +00:00
working on docs..
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
23584755ec
commit
36e767b1ff
58
README.md
58
README.md
@ -444,18 +444,68 @@ _action_ is build-in.
|
||||
## Features
|
||||
|
||||
Features is a module that helps build _features_ out of sets of actions
|
||||
and manage sets of features according to external criteria and
|
||||
feature-feature dependencies.
|
||||
apply them to objects and manage sets of features via external criteria
|
||||
and feature-to-feature dependencies.
|
||||
|
||||
|
||||
### The main entities:
|
||||
|
||||
**Feature**
|
||||
**FeatureSet (Features)**
|
||||
|
||||
```javascript
|
||||
var feature_set = new FeatureSet()
|
||||
```
|
||||
|
||||
XXX
|
||||
|
||||
|
||||
**FeatureSet (Features)**
|
||||
**Feature**
|
||||
```javascript
|
||||
feature_set.Feature({
|
||||
tag: 'minimal_feature_example',
|
||||
})
|
||||
|
||||
feature_set.Feature({
|
||||
// documentation (optional)...
|
||||
title: 'Example Feature',
|
||||
doc: 'A feature to demo the base API...',
|
||||
|
||||
// feature unique identifier (required)...
|
||||
tag: 'feature_example',
|
||||
|
||||
// applicability test (optional)
|
||||
isApplicable: function(){ /* ... */ },
|
||||
|
||||
// feature load priority (optional)
|
||||
priority: 'medium',
|
||||
|
||||
// list of feature tags to load if available (optional)
|
||||
suggested: [],
|
||||
|
||||
// list of feature tags required to load before this feature (optional)
|
||||
depends: [],
|
||||
|
||||
// Exclusive tag (optional)
|
||||
exclusive: 'Example feature',
|
||||
|
||||
// feature configuration (optional)
|
||||
config: {
|
||||
option: 'value',
|
||||
// ...
|
||||
},
|
||||
|
||||
// actions (optional)
|
||||
actions: Actions({
|
||||
// ...
|
||||
})
|
||||
|
||||
// action handlers (optional)
|
||||
handlers: [
|
||||
['action.pre', function(){ /* ... */ }],
|
||||
// ...
|
||||
]
|
||||
})
|
||||
```
|
||||
|
||||
XXX
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user