mirror of
https://github.com/flynx/features.js.git
synced 2025-12-25 12:31:58 +00:00
minor doc changes + config shadowing warning...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c91723c94b
commit
3035b45b47
10
README.md
10
README.md
@ -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: {
|
||||
// ...
|
||||
}
|
||||
// ...
|
||||
})
|
||||
|
||||
|
||||
@ -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){
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user