mirror of
https://github.com/wassname/talk.git
synced 2026-07-29 11:28:24 +08:00
Adds graph functionality for plugins
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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,3 +1,3 @@
|
||||
{
|
||||
"extends": "../../client/.babelrc"
|
||||
"extends": "../../.babelrc"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user