Adds graph functionality for plugins

This commit is contained in:
Belen Curcio
2017-03-29 22:14:56 -03:00
parent 9df334866d
commit 659c63e5cb
4 changed files with 13 additions and 4 deletions
+9 -3
View File
@@ -1,3 +1,5 @@
import asd from 'coral-framework';
console.log(asd)
import {client as clientPlugins} from 'pluginsConfig';
function importer (fill) {
@@ -42,7 +44,11 @@ function importer (fill) {
}
function addProps (plugin) {
plugin.props = getConfig(plugin.name);
/**
* addProps add properties to the injected plugins
*/
plugin.props = {...getConfig(plugin.name), plugin: 'true'};
return plugin;
}
@@ -108,8 +114,8 @@ function graphImporter () {
return context
.keys()
.map(key => shapeData(key))
.reduce((entry, actionsPlugin) => {
const input = context(actionsPlugin.key);
.reduce((entry, graphPlugin) => {
const input = context(graphPlugin.key);
const res = Object.keys(input)
.map(key => input[key]);
return [...entry, ...res];
+2
View File
@@ -4,10 +4,12 @@ import I18n from './modules/i18n/i18n';
import actions from './actions';
import Slot from './components/Slot';
console.log(actions);
export default {
pym,
Slot,
I18n,
store,
actions,
...actions
};
@@ -3,6 +3,7 @@ import styles from './style.css';
export default (props) => (
<div className={styles.Respect} key={props.key}>
{console.log(props)}
<button>Respect</button>
</div>
);
+1 -1
View File
@@ -1,3 +1,3 @@
{
"extends": "../../client/.babelrc"
"extends": "../../.babelrc"
}