Extended context

This commit is contained in:
Belen Curcio
2017-03-29 17:21:31 -03:00
parent cfb28c4c2a
commit 635df54a2c
9 changed files with 24 additions and 20 deletions
+14
View File
@@ -0,0 +1,14 @@
{
"presets": [
"es2015"
],
"plugins": [
"add-module-exports",
"transform-class-properties",
"transform-decorators-legacy",
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
]
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"verbose": true,
"ignore": ["test/*", "client/*", "dist/*"],
"ignore": ["test/*", "client/*", "dist/*", "plugins/*/client"],
"ext": "js,json,graphql"
}
+1 -2
View File
@@ -16,7 +16,7 @@ import {queryStream} from 'coral-framework/graphql/queries';
import {postComment, postFlag, postLike, postDontAgree, deleteAction, addCommentTag, removeCommentTag} from 'coral-framework/graphql/mutations';
import {editName} from 'coral-framework/actions/user';
import {updateCountCache} from 'coral-framework/actions/asset';
import {notificationActions, authActions, assetActions, pym} from 'coral-framework';
import {notificationActions, authActions, assetActions, pym, Slot} from 'coral-framework';
import Stream from './Stream';
import InfoBox from 'coral-plugin-infobox/InfoBox';
@@ -34,7 +34,6 @@ import ConfigureStreamContainer from 'coral-configure/containers/ConfigureStream
import Comment from './Comment';
import LoadMore from './LoadMore';
import NewCount from './NewCount';
import {Slot} from 'coral-framework';
class Embed extends Component {
+1 -1
View File
@@ -1,5 +1,5 @@
import React, {Component} from 'react';
import { importer as injectPlugins } from 'coral-framework/helpers/importer';
import {importer as injectPlugins} from 'coral-framework/helpers/importer';
class Slot extends Component {
render() {
+2 -12
View File
@@ -96,21 +96,11 @@ function importAll(context) {
}
function actionsImporter () {
return importAll(require.context('plugins', true, /\.\/(.*)\/client\/actions.js$/))
return importAll(require.context('plugins', true, /\.\/(.*)\/client\/actions.js$/));
}
function reducersImporter () {
const context = require.context('plugins', true, /\.\/(.*)\/client\/reducer.js$/);
return context
.keys()
.map(key => shapeData(key))
.reduce((entry, reducerPlugin) => {
entry[reducerPlugin.name] = context(reducerPlugin.key);
return entry;
}, {});
return importAll(require.context('plugins', true, /\.\/(.*)\/client\/reducer.js$/));
}
export default {
-1
View File
@@ -4,7 +4,6 @@ import I18n from './modules/i18n/i18n';
import actions from './actions';
import Slot from './components/Slot';
console.log(actions)
export default {
pym,
Slot,
+2
View File
@@ -93,6 +93,7 @@
"devDependencies": {
"apollo-client": "^0.8.3",
"autoprefixer": "^6.5.2",
"babel-cli": "^6.24.0",
"babel-core": "^6.24.0",
"babel-eslint": "^7.2.1",
"babel-jest": "^19.0.0",
@@ -106,6 +107,7 @@
"babel-plugin-transform-react-jsx": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-0": "^6.16.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
@@ -1 +1 @@
export const clickButton = () => ({type: 'BUTTON_CLICKED'});
export const clickButton = () => ({type: 'BUTTON_CLICKED'});
@@ -6,7 +6,7 @@ const initialState = Map({
export default function reducer (state = initialState, action) {
switch (action.type) {
default:
return state;
default:
return state;
}
}