diff --git a/.eslintignore b/.eslintignore index c7174499..9791ef95 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,5 +2,4 @@ node_modules/ exports/ index.js test/ -server/render/handlePageRender.js -server/render/handleShowRender.js +server/render/build diff --git a/package.json b/package.json index 8aaf2b29..9c31cc1a 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "lint": "eslint .", "fix": "eslint . --fix", "precommit": "eslint .", - "build": "babel server/render/src -d server/render", - "build:watch": "babel server/render/src -w -d server/render" + "build": "babel server/render/src -d server/render/build", + "build:watch": "babel server/render/src -w -d server/render/build" }, "repository": { diff --git a/server/render/handlePageRender.js b/server/render/build/handlePageRender.js similarity index 95% rename from server/render/handlePageRender.js rename to server/render/build/handlePageRender.js index eb792e72..e529fbf1 100644 --- a/server/render/handlePageRender.js +++ b/server/render/build/handlePageRender.js @@ -12,7 +12,7 @@ var _reactRouterDom = require("react-router-dom"); var _spee = require("spee.ch-components"); -var _renderFullPage = _interopRequireDefault(require("../../helpers/renderFullPage.js")); +var _renderFullPage = _interopRequireDefault(require("../renderFullPage.js")); var _reactHelmet = _interopRequireDefault(require("react-helmet")); diff --git a/server/render/handleShowRender.js b/server/render/build/handleShowRender.js similarity index 97% rename from server/render/handleShowRender.js rename to server/render/build/handleShowRender.js index a109c9d2..04320311 100644 --- a/server/render/handleShowRender.js +++ b/server/render/build/handleShowRender.js @@ -10,7 +10,7 @@ var _reactRedux = require("react-redux"); var _reactRouterDom = require("react-router-dom"); -var _renderFullPage = _interopRequireDefault(require("../../helpers/renderFullPage")); +var _renderFullPage = _interopRequireDefault(require("../renderFullPage")); var _reduxSaga = _interopRequireDefault(require("redux-saga")); diff --git a/server/helpers/renderFullPage.js b/server/render/renderFullPage.js similarity index 100% rename from server/helpers/renderFullPage.js rename to server/render/renderFullPage.js diff --git a/server/render/src/handlePageRender.jsx b/server/render/src/handlePageRender.jsx index 39594cf3..8bc14d07 100644 --- a/server/render/src/handlePageRender.jsx +++ b/server/render/src/handlePageRender.jsx @@ -11,7 +11,7 @@ import { Reducers, GAListener, App } from 'spee.ch-components'; the bundle sent to the server? there might also be issues if this package uses a different version of spee.ch-components than www.spee.ch does? */ -import renderFullPage from '../../helpers/renderFullPage.js'; +import renderFullPage from '../renderFullPage.js'; import Helmet from 'react-helmet'; const siteConfig = require('../../../config/siteConfig.js'); diff --git a/server/render/src/handleShowRender.jsx b/server/render/src/handleShowRender.jsx index 4999a171..9b5004f5 100644 --- a/server/render/src/handleShowRender.jsx +++ b/server/render/src/handleShowRender.jsx @@ -3,7 +3,7 @@ import { renderToString } from 'react-dom/server'; import { createStore, applyMiddleware } from 'redux'; import { Provider } from 'react-redux'; import { StaticRouter } from 'react-router-dom'; -import renderFullPage from '../../helpers/renderFullPage'; +import renderFullPage from '../renderFullPage'; import createSagaMiddleware from 'redux-saga'; import { call } from 'redux-saga/effects'; import { Reducers, GAListener, App, Sagas, Actions } from 'spee.ch-components'; diff --git a/server/routes/assets/serveAssetByClaim.js b/server/routes/assets/serveAssetByClaim.js index 74e28170..26c1a995 100644 --- a/server/routes/assets/serveAssetByClaim.js +++ b/server/routes/assets/serveAssetByClaim.js @@ -1,7 +1,7 @@ const { sendGAServeEvent } = require('../../helpers/googleAnalytics'); const { determineResponseType, logRequestData, getClaimIdAndServeAsset } = require('../../helpers/serveHelpers.js'); const lbryUri = require('../../helpers/lbryUri.js'); -const handleShowRender = require('../../render/handleShowRender.js'); +const handleShowRender = require('../../render/build/handleShowRender.js'); const SERVE = 'SERVE'; /* diff --git a/server/routes/assets/serveAssetByIdentifierAndClaim.js b/server/routes/assets/serveAssetByIdentifierAndClaim.js index 207d5fb7..470a0be7 100644 --- a/server/routes/assets/serveAssetByIdentifierAndClaim.js +++ b/server/routes/assets/serveAssetByIdentifierAndClaim.js @@ -6,7 +6,7 @@ const { getClaimIdAndServeAsset, } = require('../../helpers/serveHelpers.js'); const lbryUri = require('../../helpers/lbryUri.js'); -const handleShowRender = require('../../render/handleShowRender.js'); +const handleShowRender = require('../../render/build/handleShowRender.js'); const SERVE = 'SERVE'; diff --git a/server/routes/fallback/sendReactApp.js b/server/routes/fallback/sendReactApp.js index 4a269454..e291fd0a 100644 --- a/server/routes/fallback/sendReactApp.js +++ b/server/routes/fallback/sendReactApp.js @@ -1,4 +1,4 @@ -const handlePageRender = require('../../render/handlePageRender.js'); +const handlePageRender = require('../../render/build/handlePageRender.js'); const sendReactApp = (req, res) => { handlePageRender(req, res); diff --git a/server/routes/pages/sendReactApp.js b/server/routes/pages/sendReactApp.js index 4a269454..e291fd0a 100644 --- a/server/routes/pages/sendReactApp.js +++ b/server/routes/pages/sendReactApp.js @@ -1,4 +1,4 @@ -const handlePageRender = require('../../render/handlePageRender.js'); +const handlePageRender = require('../../render/build/handlePageRender.js'); const sendReactApp = (req, res) => { handlePageRender(req, res);