Commit cf14b659 authored by Jure's avatar Jure

Make core -> pubsweet-core and make the references to it friendlier.

parent db0e6ab7
import React from '../node_modules/core/node_modules/react'
import { render } from '../node_modules/core/node_modules/react-dom'
import React from 'pubsweet-core/node_modules/react'
import { render } from 'pubsweet-core/node_modules/react-dom'
import configureStore from '../node_modules/core/app/store/configureStore'
import Root from '../node_modules/core/app/components/Root'
import configureStore from 'pubsweet-core/app/store/configureStore'
import Root from 'pubsweet-core/app/components/Root'
import { AppContainer } from 'react-hot-loader'
let store = configureStore()
render(
<AppContainer component={Root} props={{ store }} />,
<AppContainer>
<Root store={store}/>
</AppContainer>,
document.getElementById('root')
)
if (module.hot) {
module.hot.accept('../node_modules/core/app/components/Root', () => {
module.hot.accept('pubsweet-core/app/components/Root', () => {
const NextRoot = require('pubsweet-core/app/components/Root').default
render(
<AppContainer
component={require('../node_modules/core/app/components/Root').default}
props={{ store }}
/>,
<AppContainer>
<NextRoot store={store}/>
</AppContainer>,
document.getElementById('root')
)
})
......
import React from '../../../node_modules/core/node_modules/react'
import { LinkContainer } from '../../../node_modules/core/node_modules/react-router-bootstrap'
import { Navbar, Nav, NavItem, NavbarBrand } from '../../../node_modules/core/node_modules/react-bootstrap'
import React from 'pubsweet-core/node_modules/react'
import { LinkContainer } from 'pubsweet-core/node_modules/react-router-bootstrap'
import { Navbar, Nav, NavItem, NavbarBrand } from 'pubsweet-core/node_modules/react-bootstrap'
import AuthHelper from '../../../node_modules/core/app/helpers/AuthHelper'
import NavbarUser from '../../../node_modules/core/app/components/Navigation/NavbarUser'
import AuthHelper from 'pubsweet-core/app/helpers/AuthHelper'
import NavbarUser from 'pubsweet-core/app/components/Navigation/NavbarUser'
export default class Navigation extends React.Component {
......@@ -27,8 +27,8 @@ export default class Navigation extends React.Component {
</Navbar.Header>
<Nav eventKey={0}>
<LinkContainer to='/manage/posts'>
<NavItem>Science Posts</NavItem>
</LinkContainer>p
<NavItem>Science Postss</NavItem>
</LinkContainer>
{ AuthHelper.showForUser(auth, 'users') &&
<LinkContainer to='/manage/users'>
<NavItem>Users</NavItem>
......
import React from '../node_modules/core/node_modules/react'
import { Route } from '../node_modules/core/node_modules/react-router'
import React from 'pubsweet-core/node_modules/react'
import { Route } from 'pubsweet-core/node_modules/react-router'
import { requireAuthentication } from '../node_modules/core/app/components/AuthenticatedComponent'
import { requireAuthentication } from 'pubsweet-core/app/components/AuthenticatedComponent'
// Manage
import Manage from '../node_modules/core/app/components/Manage'
import PostsManager from '../node_modules/core/app/components/PostsManager/PostsManager'
import ScienceWriter from '../node_modules/core/app/components/ScienceWriter/ScienceWriter'
import UsersManager from '../node_modules/core/app/components/UsersManager/UsersManager'
import Manage from 'pubsweet-core/app/components/Manage'
import PostsManager from 'pubsweet-core/app/components/PostsManager/PostsManager'
import ScienceWriter from 'pubsweet-core/app/components/ScienceWriter/ScienceWriter'
import UsersManager from 'pubsweet-core/app/components/UsersManager/UsersManager'
// Public
import Blog from '../node_modules/core/app/components/Blog/Blog'
import ScienceReader from '../node_modules/core/app/components/ScienceReader/ScienceReader'
import Blog from 'pubsweet-core/app/components/Blog/Blog'
import ScienceReader from 'pubsweet-core/app/components/ScienceReader/ScienceReader'
// Authentication
import Login from '../node_modules/core/app/components/Login/Login'
import Signup from '../node_modules/core/app/components/Signup/Signup'
import Login from 'pubsweet-core/app/components/Login/Login'
import Signup from 'pubsweet-core/app/components/Signup/Signup'
export default (
<Route>
......
const api = require('core/api/api')
const api = require('pubsweet-core/api/api')
const http = require('http')
// Get port from environment or default to 3000
var port = process.env.PORT || '3000'
......
{
"name": "science-blogger",
"version": "1.0.0-alpha",
"version": "1.0.0-alpha.2",
"private": true,
"scripts": {
"setup": "node node_modules/core/api/setup.js",
......@@ -12,7 +12,7 @@
"eslint": "eslint"
},
"dependencies": {
"core": "git+https://gitlab.coko.foundation/pubsweet/core.git#master",
"pubsweet-core": "git+https://gitlab.coko.foundation/pubsweet/core.git#master",
"react-hot-loader": "^3.0.0-beta.1"
},
"devDependencies": {
......
var path = require('path')
var webpack = require('webpack')
var config = require('../config')
var ThemeResolver = require('../node_modules/core/webpack/ThemeResolver')
var ThemeResolver = require('pubsweet-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 = [
......@@ -13,7 +12,7 @@ var commonLoaders = [
test: /\.js$|\.jsx$/,
loader: 'babel',
query: {
presets: ['es2015', 'react'],
presets: ['react', 'es2015'],
plugins: ['react-hot-loader/babel']
},
include: [
......
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