incorporated spee.ch-components
This commit is contained in:
parent
cb4da07ab5
commit
9f3ed8c804
12 changed files with 11 additions and 60603 deletions
47990
exports/clientBundle.js
47990
exports/clientBundle.js
File diff suppressed because one or more lines are too long
12546
index.js
12546
index.js
File diff suppressed because one or more lines are too long
1
index.js.map
Normal file
1
index.js.map
Normal file
File diff suppressed because one or more lines are too long
|
@ -64,7 +64,8 @@
|
|||
"webpack-node-externals": "^1.6.0",
|
||||
"whatwg-fetch": "^2.0.3",
|
||||
"winston": "^2.3.1",
|
||||
"winston-slack-webhook": "billbitt/winston-slack-webhook"
|
||||
"winston-slack-webhook": "billbitt/winston-slack-webhook",
|
||||
"spee.ch-components": "git://github.com/billbitt/spee.ch-components.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import React from 'react';
|
||||
import { renderToString } from 'react-dom/server';
|
||||
import { createStore } from 'redux';
|
||||
import Reducer from 'client/reducers';
|
||||
import { Provider } from 'react-redux';
|
||||
import { StaticRouter } from 'react-router-dom';
|
||||
import GAListener from 'client/components/GAListener/';
|
||||
import App from 'client/app';
|
||||
import { Reducers, GAListener, App } from 'spee.ch-components';
|
||||
import renderFullPage from './renderFullPage.js';
|
||||
import Helmet from 'react-helmet';
|
||||
|
||||
|
@ -13,7 +11,7 @@ module.exports = (req, res) => {
|
|||
let context = {};
|
||||
|
||||
// create a new Redux store instance
|
||||
const store = createStore(Reducer);
|
||||
const store = createStore(Reducers);
|
||||
|
||||
// render component to a string
|
||||
const html = renderToString(
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
import React from 'react';
|
||||
import { renderToString } from 'react-dom/server';
|
||||
import { createStore, applyMiddleware } from 'redux';
|
||||
import Reducer from '../../client/reducers/index';
|
||||
import { Provider } from 'react-redux';
|
||||
import { StaticRouter } from 'react-router-dom';
|
||||
import GAListener from '../../client/components/GAListener/index';
|
||||
import App from '../../client/app';
|
||||
import renderFullPage from './renderFullPage';
|
||||
import createSagaMiddleware from 'redux-saga';
|
||||
import { call } from 'redux-saga/effects';
|
||||
import { handleShowPageUri } from '../../client/sagas/show_uri';
|
||||
import { onHandleShowPageUri } from '../../client/actions/show';
|
||||
import { Reducers, GAListener, App, Sagas, Actions } from 'spee.ch-components';
|
||||
|
||||
import Helmet from 'react-helmet';
|
||||
|
||||
|
@ -28,11 +24,11 @@ module.exports = (req, res) => {
|
|||
const middleware = applyMiddleware(sagaMiddleware);
|
||||
|
||||
// create a new Redux store instance
|
||||
const store = createStore(Reducer, middleware);
|
||||
const store = createStore(Reducers, middleware);
|
||||
|
||||
// create saga
|
||||
const action = onHandleShowPageUri(req.params);
|
||||
const saga = returnSagaWithParams(handleShowPageUri, action);
|
||||
const action = Actions.onHandleShowPageUri(req.params);
|
||||
const saga = returnSagaWithParams(Sagas.handleShowPageUri, action);
|
||||
|
||||
// run the saga middleware
|
||||
sagaMiddleware
|
||||
|
|
14
speech.js
14
speech.js
|
@ -1,21 +1,7 @@
|
|||
import Reducer from './client/reducers';
|
||||
import rootSaga from './client/sagas';
|
||||
import GAListener from './client/components/GAListener';
|
||||
const App = require('./client/app.js');
|
||||
const Server = require('./server');
|
||||
const Pages = require('./client/pages');
|
||||
const Components = require('./client/components');
|
||||
const Containers = require('./client/containers');
|
||||
|
||||
const exports = {
|
||||
App,
|
||||
Reducer,
|
||||
rootSaga,
|
||||
GAListener,
|
||||
Server,
|
||||
Pages,
|
||||
Components,
|
||||
Containers,
|
||||
};
|
||||
|
||||
module.exports = exports;
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
const Path = require('path');
|
||||
const CLIENT_ROOT = Path.resolve(__dirname, 'client/');
|
||||
const CONFIG_ROOT = Path.resolve(__dirname, 'config/');
|
||||
|
||||
module.exports = {
|
||||
target: 'web',
|
||||
entry : ['babel-polyfill', 'whatwg-fetch', './client/client.js'],
|
||||
output: {
|
||||
path : Path.join(__dirname, 'exports/'),
|
||||
publicPath: 'exports/',
|
||||
filename : 'clientBundle.js',
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test : /.jsx?$/,
|
||||
loader : 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
query : {
|
||||
presets: ['es2015', 'react', 'stage-2'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
modules: [
|
||||
CLIENT_ROOT,
|
||||
CONFIG_ROOT,
|
||||
'node_modules',
|
||||
__dirname,
|
||||
],
|
||||
extensions: ['.js', '.jsx', '.scss'],
|
||||
},
|
||||
};
|
|
@ -1,7 +1,5 @@
|
|||
const packageBaseConfig = require('./webpack.speech.common.js');
|
||||
const clientBaseConfig = require('./webpack.client.common.js');
|
||||
|
||||
module.exports = [
|
||||
clientBaseConfig,
|
||||
packageBaseConfig,
|
||||
];
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const packageBaseConfig = require('./webpack.speech.common.js');
|
||||
const clientBaseConfig = require('./webpack.client.common.js');
|
||||
const merge = require('webpack-merge');
|
||||
|
||||
const devBuildConfig = {
|
||||
|
@ -9,5 +8,4 @@ const devBuildConfig = {
|
|||
|
||||
module.exports = [
|
||||
merge(packageBaseConfig, devBuildConfig),
|
||||
merge(clientBaseConfig, devBuildConfig),
|
||||
];
|
||||
|
|
|
@ -2,7 +2,6 @@ const webpack = require('webpack');
|
|||
const merge = require('webpack-merge');
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
const packageBaseConfig = require('./webpack.speech.common.js');
|
||||
// const clientBaseConfig = require('./webpack.client.common.js');
|
||||
|
||||
const productionBuildConfig = {
|
||||
devtool: 'source-map',
|
||||
|
@ -18,5 +17,4 @@ const productionBuildConfig = {
|
|||
|
||||
module.exports = [
|
||||
merge(packageBaseConfig, productionBuildConfig),
|
||||
// merge(clientBaseConfig, productionBuildConfig),
|
||||
];
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
const Path = require('path');
|
||||
const nodeExternals = require('webpack-node-externals');
|
||||
const CLIENT_ROOT = Path.resolve(__dirname, 'client/');
|
||||
const CONFIG_ROOT = Path.resolve(__dirname, 'config/');
|
||||
const SERVER_ROOT = Path.resolve(__dirname, 'server/');
|
||||
|
||||
|
@ -36,7 +35,6 @@ module.exports = {
|
|||
},
|
||||
resolve: {
|
||||
modules: [
|
||||
CLIENT_ROOT,
|
||||
CONFIG_ROOT,
|
||||
SERVER_ROOT,
|
||||
'node_modules',
|
||||
|
|
Loading…
Reference in a new issue