Commit 93e3ff7e authored by Jure's avatar Jure

WIP: Almost working, nearly there, just about.

parent 79c09338
// Use this file as a starting point for your project's .eslintrc.
// Copy this file, and add rule overrides as needed.
{
"extends": ["standard", "standard-react"],
"ecmaFeatures": {
"jsx": true
},
"plugins": [
"react"
]
}
MANIFEST-000060
2016/06/09-16:01:48.519358 70000051c000 Recovering log #58
2016/06/09-16:01:48.520633 70000051c000 Level-0 table #61: started
2016/06/09-16:01:48.521216 70000051c000 Level-0 table #61: 237 bytes OK
2016/06/09-16:01:48.522355 70000051c000 Delete type=0 #58
2016/06/09-16:01:48.522448 70000051c000 Delete type=3 #56
2016/06/09-15:58:26.395746 700000499000 Recovering log #55
2016/06/09-15:58:26.396820 700000499000 Level-0 table #57: started
2016/06/09-15:58:26.397551 700000499000 Level-0 table #57: 237 bytes OK
2016/06/09-15:58:26.399070 700000499000 Delete type=0 #55
2016/06/09-15:58:26.399184 700000499000 Delete type=3 #53
2016/06/09-15:58:26.399668 70000059f000 Compacting 4@0 + 1@1 files
2016/06/09-15:58:26.400904 70000059f000 Generated table #59: 34 keys, 3100 bytes
2016/06/09-15:58:26.400932 70000059f000 Compacted 4@0 + 1@1 files => 3100 bytes
2016/06/09-15:58:26.401216 70000059f000 compacted to: files[ 0 1 0 0 0 0 0 ]
2016/06/09-15:58:26.401331 70000059f000 Delete type=2 #46
2016/06/09-15:58:26.401461 70000059f000 Delete type=2 #48
2016/06/09-15:58:26.401568 70000059f000 Delete type=2 #51
2016/06/09-15:58:26.401648 70000059f000 Delete type=2 #54
2016/06/09-15:58:26.401758 70000059f000 Delete type=2 #57
import React from 'react'
import configureStore from './store/configureStore'
import { render } from 'react-dom'
import Root from './containers/Root'
import configureStore from '../node_modules/core/app/store/configureStore'
import Root from '../node_modules/core/app/components/Root'
let store = configureStore()
......
import React from 'react'
import { Route } from 'react-router'
import { requireAuthentication } from './containers/AuthenticatedComponent'
import { requireAuthentication } from '../node_modules/core/components/AuthenticatedComponent'
// Manage
import Manage from './containers/Manage'
import PostsManager from './containers/PostsManager'
import Editor from './containers/EditorWrapper'
import UsersManager from './containers/UsersManager'
import Manage from '../node_modules/core/components/Manage'
import PostsManager from '../node_modules/core/components/PostsManager/PostsManager'
import ScienceWriter from '../node_modules/core/components/ScienceWriter/ScienceWriter'
import UsersManager from '../node_modules/core/components/UsersManager/UsersManager'
// Public
import Blog from './containers/Blog'
import Blogpost from './containers/BlogpostWrapper'
import Blog from '../node_modules/core/components/Blog/Blog'
import ScienceReader from '../node_modules/core/components/ScienceReader/ScienceReader'
// Authentication
import Login from './components/Login'
import Signup from './components/Signup'
import Login from '../node_modules/core/components/Login/Login'
import Signup from '../node_modules/core/components/Signup/Signup'
export default (
<Route>
......@@ -23,12 +23,12 @@ export default (
<Route path='/manage' component={requireAuthentication(Manage)}>
<Route path='posts' component={PostsManager} />
<Route path='editor/:id' component={Editor} />
<Route path='sciencewriter/:id' component={ScienceWriter} />
<Route path='users' component={UsersManager} />
</Route>
<Route path='/login' component={Login} />
<Route path='/signup' component={Signup} />
<Route path='/:id' component={Blogpost}/>
<Route path='/:id' component={ScienceReader}/>
</Route>
)
const api = require('core/api/api')
const http = require('http')
// Get port from environment or default to 3000
var port = process.env.PORT || '3000'
api.set('port', port)
var server = http.createServer(api)
server.listen(port)
server.on('error', onError)
server.on('listening', onListening)
function onError (error) {
throw error
}
function onListening () {
var addr = server.address()
console.log('PubSweet is listening on ' + addr.port)
}
module.exports = {
secret: 'EXAMPLEDONTUSE',
API_ENDPOINT: '/api',
editor: '../registry/Substance/Writer.jsx',
// editor: '../registry/Quill/Editor.jsx',
reader: '../registry/Substance/Reader.jsx',
// reader: '../registry/Quill/Reader.jsx'
theme: 'pepper'
theme: 'pepper',
routes: 'app/routes.jsx',
navigation: 'app/components/Navigation/Xavigation.jsx'
}
......@@ -3,7 +3,7 @@
"version": "1.0.0-alpha",
"private": true,
"scripts": {
"setup": "node api/setup.js",
"setup": "node node_modules/core/api/setup.js",
"build": "webpack --colors --config ./webpack/webpack.prod.config.js",
"start": "PORT=80 NODE_ENV=production node bin/www",
"dev": "NODE_ENV=dev LOADER=hot node bin/www",
......@@ -12,7 +12,25 @@
"eslint": "eslint"
},
"dependencies": {
"core": "git+https://gitlab.coko.foundation/pubsweet/core.git#master"
"core": "git+https://gitlab.coko.foundation/pubsweet/core.git#master",
"react": "^15.1.0",
"react-dom": "^15.1.0"
},
"devDependencies": {
"babel-loader": "^6.2.4",
"babel-core": "^6.0.0",
"babel-preset-react-hmre": "^1.1.1",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"eslint": "^1.10.3",
"eslint-config-standard": "^4.4.0",
"eslint-loader": "^1.2.0",
"eslint-plugin-react": "^3.14.0",
"eslint-plugin-standard": "^1.1.0",
"eslint-config-standard-react": "^1.2.1",
"style-loader": "^0.12.3",
"webpack": "^1.12.14",
"webpack-hot-middleware": "^2.10.0"
},
"standard": {
"parser": "babel-eslint"
......
var path = require('path')
var webpack = require('webpack')
var config = require('../config')
var ThemeResolver = require('./ThemeResolver')
var ThemeResolver = require('../node_modules/core/webpack/ThemeResolver')
var assetsPath = path.join(__dirname, '..', 'public', 'assets')
var publicPath = '/assets/'
console.log('WHAT', config)
// We're including JSX components from our components package,
// but excluding its node_modules.
var commonLoaders = [
......@@ -66,16 +67,17 @@ module.exports = [
module: {
preLoaders: [{
test: /\.js$|\.jsx$/,
exclude: [/\/node_modules/, /\/lens/, /\/substance/],
exclude: [/\/lens/, /\/substance/],
loaders: ['eslint-loader']
}],
loaders: commonLoaders
},
resolve: {
root: path.resolve(__dirname, '..'),
extensions: ['', '.js', '.jsx', '.json', '.scss'],
alias: {
'editor$': config.editor,
'reader$': config.reader
'routes$': config.routes,
'navigation$': config.navigation
}
},
plugins: [
......
......@@ -2,7 +2,7 @@ var path = require('path')
var webpack = require('webpack')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var ThemeResolver = require('./ThemeResolver')
var ThemeResolver = require('../node_modules/core/webpack/ThemeResolver')
var config = require('../config')
var assetsPath = path.join(__dirname, '..', 'public', 'assets')
......@@ -71,10 +71,6 @@ module.exports = [
},
resolve: {
extensions: ['', '.js', '.jsx', '.json', '.scss'],
alias: {
'editor$': config.editor,
'reader$': config.reader
}
},
plugins: [
new webpack.ResolverPlugin([ThemeResolver], ['normal', 'context', 'loader']),
......
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