Commit 699c9641 authored by Yannis Barlas's avatar Yannis Barlas

login pages now work

parent 9259a557
{
"presets": ["env", "react", "stage-2"]
}
{
"parser": "babel-eslint",
"env": {
"es6": true,
"browser": true
},
"extends": "pubsweet"
}
{
"semi": false,
"singleQuote": true,
"trailingComma": "all"
}
import 'regenerator-runtime/runtime'
import React from 'react'
import ReactDOM from 'react-dom'
import { hot } from 'react-hot-loader'
import createHistory from 'history/createBrowserHistory'
import { configureStore, Root } from 'pubsweet-client'
import theme from '@pubsweet/coko-theme'
import routes from './routes'
const history = createHistory()
const store = configureStore(history, {})
const rootEl = document.getElementById('root')
ReactDOM.render(
<Root history={history} routes={routes} store={store} theme={theme} />,
rootEl,
)
export default hot(module)(Root)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="root"></div>
<script type="text/javascript" charset="utf-8" src="/assets/app.js"></script>
</body>
</html>
\ No newline at end of file
import React from 'react'
import { Route, Switch } from 'react-router-dom'
import Login from 'pubsweet-component-login/LoginContainer'
import Signup from 'pubsweet-component-signup/SignupContainer'
import PasswordReset from 'pubsweet-component-password-reset-frontend/PasswordReset'
const routes = (
<Switch>
<Route component={Login} path="/login" />
<Route component={Signup} path="/signup" />
<Route component={PasswordReset} path="/password-reset" />
</Switch>
)
export default routes
module.export = {}
module.exports = {}
const { deferConfig } = require('config/defer')
const path = require('path')
const components = require('./components.json')
module.exports = {
authsome: {
mode: __dirname + '/auth.js',
mode: path.join(__dirname, 'auth.js'),
},
mailer: {
from: 'nobody@example.com',
......@@ -12,11 +13,16 @@ module.exports = {
sendmail: true,
},
},
publicKeys: ['pubsweet-client', 'authsome', 'pubsweet', 'validations'],
pubsweet: { components },
'pubsweet-client': {
API_ENDPOINT: '/api',
},
'pubsweet-server': {
baseUrl: deferConfig(
cfg => `${cfg['pubsweet-server'].host}:${cfg['pubsweet-server'].port}`,
),
uploads: 'uploads',
},
validations: path.join(__dirname, 'validations'),
}
module.exports = {
dbManager: {
admin: true,
email: 'admin@admin.com',
password: 'adminadmin',
username: 'admin',
},
'pubsweet-server': {
db: {
port: 5480,
database: 'wb',
user: 'dev',
password: 'pass',
port: 5480,
user: 'dev',
},
host: 'http://localhost',
port: 3000,
},
dbManager: {
username: 'admin',
password: 'adminadmin',
email: 'admin@admin.com',
admin: true,
secret: 'somesecret',
},
}
const Joi = require('joi')
module.exports = {
collection: {
title: Joi.string(),
},
fragment: {
title: Joi.string(),
},
}
......@@ -14,13 +14,36 @@
"author": "Yannis Barlas",
"license": "MIT",
"dependencies": {
"@pubsweet/coko-theme": "^1.0.1",
"app-module-path": "^2.2.0",
"babel-preset-es2015-native-modules": "^6.9.4",
"babel-preset-minify": "^0.4.3",
"compression-webpack-plugin": "^1.1.11",
"config": "^1.30.0",
"copy-webpack-plugin": "^4.5.1",
"extract-text-webpack-plugin": "^3.0.2",
"fs-extra": "^6.0.1",
"history": "^4.7.2",
"html-webpack-plugin": "^3.2.0",
"joi": "^13.3.0",
"joi-browser": "^13.0.1",
"json-loader": "^0.5.7",
"lodash": "^4.17.10",
"pubsweet": "^2.2.4",
"pubsweet-client": "^2.5.5",
"pubsweet-component-login": "^1.1.2",
"pubsweet-component-password-reset-backend": "^1.0.4",
"pubsweet-component-password-reset-frontend": "^1.0.17",
"pubsweet-component-signup": "^1.0.17",
"pubsweet-server": "^7.1.0"
"pubsweet-server": "^7.1.0",
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-hot-loader": "^4.2.0",
"react-router-dom": "^4.2.2",
"regenerator-runtime": "^0.11.1",
"script-loader": "^0.7.2",
"webpack": "^3.11.0",
"webpack-hot-middleware": "^2.22.2"
},
"scripts": {
"server": "pubsweet server",
......@@ -29,14 +52,28 @@
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.4",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"compression-webpack-plugin": "^1.1.11",
"copy-webpack-plugin": "^4.5.1",
"react-hot-loader": "^4.2.0",
"string-replace-loader": "^2.1.1"
"css-loader": "^0.28.11",
"eslint": "^4.19.1",
"eslint-config-pubsweet": "^0.0.6",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jest": "^21.17.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-standard": "^3.1.0",
"file-loader": "^1.1.11",
"prettier": "^1.13.2",
"string-replace-loader": "^2.1.1",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1"
}
}
const path = require('path')
// const path = require('path')
const config = require('config')
const babelIncludes = require('./babel-includes')
......@@ -65,12 +65,6 @@ module.exports = [
{
loader: 'css-loader',
},
{
loader: 'sass-loader',
options: {
includePaths: [path.join(__dirname, '..', 'node_modules')],
},
},
],
},
{
......@@ -88,12 +82,6 @@ module.exports = [
localIdentName: '[name]_[local]-[hash:base64:8]',
},
},
{
loader: 'sass-loader',
options: {
includePaths: [path.join(__dirname, '..', 'node_modules')],
},
},
],
},
{
......
const path = require('path')
const webpack = require('webpack')
//const ThemePlugin = require('pubsweet-theme-plugin')
// const ThemePlugin = require('pubsweet-theme-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const CompressionPlugin = require('compression-webpack-plugin')
const fs = require('fs-extra')
......@@ -44,7 +44,7 @@ module.exports = [
joi: 'joi-browser',
config: clientConfigPath,
},
//plugins: [new ThemePlugin(config['pubsweet-client'].theme)],
// plugins: [new ThemePlugin(config['pubsweet-client'].theme)],
extensions: ['.js', '.jsx', '.json', '.scss'],
enforceExtension: false,
},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment