minor doc changes + config shadowing warning...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-07-04 17:06:10 +03:00
parent c91723c94b
commit 3035b45b47
3 changed files with 19 additions and 3 deletions

View File

@ -55,9 +55,13 @@ feature_set.Feature({
depends: [],
// Exclusive tag (optional)
exclusive: 'Example feature',
// NOTE: a feature can be a member of more than one exclusive group,
// to list more than one use an Array...
exclusive: 'Example',
// feature configuration (optional)
// NOTE: if not present here this will be taken from .actions.config
// NOTE: this takes priority over .actions.config
config: {
option: 'value',
// ...
@ -65,6 +69,10 @@ feature_set.Feature({
// actions (optional)
actions: Actions({
// alternative configuration location...
config: {
// ...
}
// ...
})

View File

@ -134,6 +134,14 @@ module.FeatureProto = {
if(this.config != null
|| (this.actions != null
&& this.actions.config != null)){
// sanity check -- warn of config shadowing...
if(this.config && this.actions.config){
console.warn('Feature config shadowed: '
+'both .config (used) and .actions.config (ignored) are defined for:',
this.tag,
this)
}
var config = this.config = this.config || this.actions.config
if(actions.config == null){

View File

@ -1,6 +1,6 @@
{
"name": "ig-features",
"version": "3.2.0",
"version": "3.2.1",
"description": "",
"main": "features.js",
"scripts": {
@ -23,7 +23,7 @@
},
"homepage": "https://github.com/flynx/features.js#readme",
"dependencies": {
"ig-actions": "^3.2.4",
"ig-actions": "^3.2.5",
"ig-object": "^1.0.0"
}
}