From 3a3139cc6fb7170e232f9c2df08ab3531aae5567 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 27 Sep 2016 04:02:38 +0300 Subject: [PATCH] now merging configs via mix(..), not yet sure if this should be here or above... Signed-off-by: Alex A. Naanou --- actions.js | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/actions.js b/actions.js index d966eee..870b2be 100755 --- a/actions.js +++ b/actions.js @@ -1311,6 +1311,15 @@ function(){ args.forEach(function(p){ res = Object.create(mixin.call(res, p)) + + // merge config... + if(p.config){ + var config = res.config = res.config || Object.create({}) + + Object.keys(p.config).forEach(function(k){ + res.config.__proto__[k] = JSON.parse(JSON.stringify(p.config[k])) + }) + } }) return res diff --git a/package.json b/package.json index 9113d9e..fbda568 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-actions", - "version": "1.2.1", + "version": "1.3.0", "description": "", "main": "actions.js", "scripts": {