diff --git a/.env-sample b/.env-sample index 2e01b8bb8..9d248fbe1 100644 --- a/.env-sample +++ b/.env-sample @@ -6,7 +6,7 @@ PORT=443 # REDUX_DEV_SERVER_PORT=8082 TITLE=ReCodEx -SKING=skin-green +SKIN=skin-green ALLOW_NORMAL_REGISTRATION=true ALLOW_LDAP_REGISTRATION=false ALLOW_CAS_REGISTRATION=true diff --git a/bin/dev.js b/bin/dev.js index ae1a2d243..498ab003a 100644 --- a/bin/dev.js +++ b/bin/dev.js @@ -24,6 +24,7 @@ app.get('*', (req, res) => { link: '' }, reduxState: undefined, + skin: process.env.SKIN, style: `http://localhost:${WEBPACK_DEV_SERVER_PORT}/style.css`, bundle: `http://localhost:${WEBPACK_DEV_SERVER_PORT}/bundle.js` }); diff --git a/config/webpack.config-dev.js b/config/webpack.config-dev.js index 593adfbe8..037f18b95 100644 --- a/config/webpack.config-dev.js +++ b/config/webpack.config-dev.js @@ -6,7 +6,7 @@ const GitRevisionPlugin = require('git-revision-webpack-plugin'); // load variables from .env require('dotenv').config(); -// fix Widnows 10 Ubuntu issues with less loader: +// fix Windows 10 and Ubuntu issues with less loader: try { require('os').networkInterfaces(); } catch (e) { diff --git a/config/webpack.config.js b/config/webpack.config.js index 8a75cb2cd..5c3c010d3 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -6,7 +6,7 @@ const GitRevisionPlugin = require('git-revision-webpack-plugin'); // load variables from .env require('dotenv').config(); -// fix Widnows 10 Ubuntu issues with less loader: +// fix Windows 10 and Ubuntu issues with less loader: try { require('os').networkInterfaces(); } catch (e) { diff --git a/package.json b/package.json index d078820f9..07de825c0 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "private": true, "scripts": { - "clean": "rm -f public/bundle* && rm -f public/style* && rm -f bin/server.js", + "clean": "rm -f public/bundle* && rm -f public/style* && rm -f bin/server.js && rm -f bin/style*", "build:server": "webpack -p --config config/webpack.server.js", "build:client": "webpack -p --config config/webpack.config.js", "build:server:test": "webpack --config config/webpack.server.js", diff --git a/src/server.js b/src/server.js index 075061b4f..aad68341d 100644 --- a/src/server.js +++ b/src/server.js @@ -72,6 +72,7 @@ const renderWithoutSSR = (res, renderProps) => { html: '', head, reduxState: 'undefined', + skin: process.env.SKIN, bundle, style }); @@ -90,6 +91,7 @@ const renderPage = (res, store, renderProps) => { html, head, reduxState, + skin: process.env.SKIN, bundle, style }); diff --git a/views/index.ejs b/views/index.ejs index 79bdca045..e8ec9523a 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -68,7 +68,7 @@