Commit e144864b authored by Alexandros Georgantas's avatar Alexandros Georgantas

restructure

parent cc17ae4b
**/_build **/_build
**/node_modules **/node_modules
**/coverage **/coverage
packages/ui/styleguide
...@@ -6,37 +6,17 @@ ...@@ -6,37 +6,17 @@
}, },
"extends": ["pubsweet"], "extends": ["pubsweet"],
"rules": { "rules": {
"prefer-destructuring": ["error", {
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": false
}
}, {
"enforceForRenamedProperties": false
}],
"global-require": 0,
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/no-static-element-interactions": 0,
"import/no-dynamic-require": 0, "import/no-dynamic-require": 0,
"import/no-extraneous-dependencies": 0, "import/no-extraneous-dependencies": 0,
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"import/prefer-default-export": 0,
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-param-reassign": 0,
"no-shadow": 0,
"no-underscore-dangle": 0,
"react/forbid-prop-types": 0,
"react/no-unused-prop-types": 0,
"react/no-unused-state": 0,
"react/prop-types": 0,
"react/require-default-props": 0,
"sort-keys": 0 "sort-keys": 0
} },
"overrides": [
{
"files": ["test/**/*.test.js"],
"globals": {
"fixture": true,
"text": true
}
}
]
} }
.env.* .env.*
coverage/ coverage/
lerna-debug.log
node_modules/ node_modules/
npm-debug.log npm-debug.log
packages/editoria-app/_build/* _build/*
packages/editoria-app/api/db/* config/local*
packages/editoria-app/config/local* logs/*
packages/editoria-app/logs/* pubsweet.log
packages/editoria-app/pubsweet.log tmp/
packages/editoria-app/tmp/ uploads/*
packages/editoria-app/uploads/*
yarn-error.log yarn-error.log
data
MIT License MIT License
Copyright (c) 2017 The Regents of the University of California Copyright (c) 2017 University of California Press
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
...@@ -27,7 +27,7 @@ import PrivateRoute from './components/PrivateRoute' ...@@ -27,7 +27,7 @@ import PrivateRoute from './components/PrivateRoute'
const Editor = WithConfig(Wax, { const Editor = WithConfig(Wax, {
layout: 'editoria', layout: 'editoria',
lockWhenEditing: true, lockWhenEditing: true,
pollingTimer: 1000, pollingTimer: 1500,
autoSave: false, autoSave: false,
tools: [ tools: [
'document', 'document',
......
...@@ -3,6 +3,7 @@ const path = require('path') ...@@ -3,6 +3,7 @@ const path = require('path')
const components = require('./components') const components = require('./components')
const bookBuilder = require('./modules/book-builder') const bookBuilder = require('./modules/book-builder')
const winston = require('winston') const winston = require('winston')
// const authsomeMode = require('./modules/authsome')
const logger = new winston.Logger({ const logger = new winston.Logger({
transports: [ transports: [
...@@ -14,7 +15,7 @@ const logger = new winston.Logger({ ...@@ -14,7 +15,7 @@ const logger = new winston.Logger({
module.exports = { module.exports = {
authsome: { authsome: {
mode: require.resolve('pubsweet-editoria-authsome'), mode: require.resolve('./modules/authsome'),
teams: { teams: {
productionEditor: { productionEditor: {
name: 'Production Editor', name: 'Production Editor',
......
export PUBSWEET_SECRET='dev_secret'
export POSTGRES_USER='dev'
export POSTGRES_PASSWORD='secretpassword'
export POSTGRES_HOST='localhost'
export POSTGRES_DB='editoria_dev'
export POSTGRES_PORT='5460'
export SERVER_PORT='3050'
export INK_ENDPOINT='http://inkdemo-api.coko.foundation/'
export INK_USERNAME='editoria@coko.foundation'
export INK_PASSWORD='editoria'
export INK_EDITORIA_TYPESCRIPT='2'
export MAILER_USER='xpub@sandbox9af3d5dc64334deca9759efe7056d6b3.mailgun.org'
export MAILER_PASSWORD='xpubpass'
export MAILER_SENDER='dev@example.com'
export MAILER_HOSTNAME='smtp.mailgun.org'
export PASSWORD_RESET_URL='http://localhost:3000/password-reset'
export PASSWORD_RESET_SENDER='dev@example.com'
export NODE_ENV='development'
export ADMIN_USERNAME='admin'
export ADMIN_EMAIL='admin@example.com'
export ADMIN_PASSWORD='adminadmin'
\ No newline at end of file
...@@ -812,10 +812,7 @@ module.exports = { ...@@ -812,10 +812,7 @@ module.exports = {
const mode = new EditoriaMode(userId, operation, object, context) const mode = new EditoriaMode(userId, operation, object, context)
return mode.canFragmentEdit() return mode.canFragmentEdit()
}, },
'can view stateList': (userId, operation, object, context) => { 'can view stateList': (userId, operation, object, context) => true,
const mode = new EditoriaMode(userId, operation, object, context)
return mode.canInteractWithFragments()
},
'can reorder bookComponents': (userId, operation, object, context) => { 'can reorder bookComponents': (userId, operation, object, context) => {
const mode = new EditoriaMode(userId, operation, object, context) const mode = new EditoriaMode(userId, operation, object, context)
return mode.canInteractWithFragments() return mode.canInteractWithFragments()
......
export PUBSWEET_SECRET='prod_secret'
export POSTGRES_USER='prod'
export POSTGRES_PASSWORD='secretpassword'
export POSTGRES_HOST='localhost'
export POSTGRES_DB='editoria_prod'
export POSTGRES_PORT='5465'
export SERVER_PORT='3000'
export INK_ENDPOINT='http://inkdemo-api.coko.foundation/'
export INK_USERNAME='editoria@coko.foundation'
export INK_PASSWORD='editoria'
export INK_EDITORIA_TYPESCRIPT='2'
export MAILER_USER='xpub@sandbox9af3d5dc64334deca9759efe7056d6b3.mailgun.org'
export MAILER_PASSWORD='xpubpass'
export MAILER_SENDER='prod@example.com'
export MAILER_HOSTNAME='smtp.mailgun.org'
export PASSWORD_RESET_URL='http://localhost:3000/password-reset'
export PASSWORD_RESET_SENDER='prod@example.com'
export NODE_ENV='production'
\ No newline at end of file
{
"lerna": "2.4.0",
"packages": [
"packages/*"
],
"version": "independent"
}
{ {
"author": "Collaborative Knowledge Foundation", "name": "UCP",
"description": "Monorepo grouping all the different parts of the UCP project", "description": "An application for managing book production flows",
"private": true,
"keywords": [
"Coko",
"Coko Foundation",
"UCP",
"University of California Press",
"book",
"book production",
"book management"
],
"repository": {
"type": "git",
"url": "https://gitlab.coko.foundation/editoria/ucp"
},
"homepage": "https://editoria.pub/",
"license": "MIT",
"version": "1.0.0",
"dependencies": {
"@pubsweet/component-polling-client": "^0.0.3",
"@pubsweet/component-polling-server": "^0.0.9",
"@pubsweet/db-manager": "^1.0.7",
"@pubsweet/default-theme": "^0.2.0",
"@pubsweet/logger": "^0.2.2",
"@pubsweet/ui": "^4.1.3",
"authsome": "^0.1.0",
"font-awesome": "4.7.0",
"highlight.js": "^9.13.1",
"history": "^4.7.2",
"lodash": "4.17.4",
"path-to-regexp": "^2.4.0",
"prop-types": "^15.6.0",
"pubsweet": "^2.2.8",
"pubsweet-client": "^2.5.5",
"pubsweet-component-bookbuilder": "^1.1.2",
"pubsweet-component-editoria-dashboard": "^0.1.1",
"pubsweet-component-epub": "^0.5.2",
"pubsweet-component-epub-frontend": "^0.1.3",
"pubsweet-component-ink-backend": "^0.1.1",
"pubsweet-component-ink-frontend": "^0.2.3",
"pubsweet-component-login": "^0.5.5",
"pubsweet-component-manage": "^1.0.0",
"pubsweet-component-navigation": "^1.0.1",
"pubsweet-component-pagedjs-viewer": "^0.1.1",
"pubsweet-component-password-reset-backend": "1.0.0",
"pubsweet-component-password-reset-frontend": "1.0.0",
"pubsweet-component-signup": "^0.4.1",
"pubsweet-component-theme-editoria": "^0.0.5",
"pubsweet-component-users-manager": "1.0.0",
"pubsweet-component-vivliostyle-viewer": "^1.0.0",
"pubsweet-component-wax": "^0.6.14",
"pubsweet-server": "^7.2.0",
"pubsweet-theme-plugin": "^0.0.3",
"react": "^16.2.0",
"react-bootstrap": "0.32.1",
"react-dnd": "2.5.4",
"react-dnd-html5-backend": "2.5.4",
"react-dom": "^16.2.0",
"react-redux": "5.0.4",
"react-router-bootstrap": "0.24.4",
"react-router-dom": "^4.2.2",
"recompose": "^0.26.0",
"redux": "3.6.0",
"typeface-fira-sans": "^0.0.43"
},
"devDependencies": { "devDependencies": {
"babel-eslint": "^8.0.3", "app-module-path": "^2.2.0",
"autobind-decorator": "^1.3.4",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-babili": "0.0.12",
"babel-preset-env": "^1.6.0",
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",
"babel-preset-es2015-native-modules": "^6.9.4",
"babel-preset-minify": "^0.3.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babili-webpack-plugin": "^0.0.11",
"bootstrap-sass": "^3.3.7",
"clean-webpack-plugin": "^0.1.17",
"compression-webpack-plugin": "^1.1.6",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.4",
"enzyme": "^2.7.1",
"enzyme-to-json": "^1.4.5",
"babel-eslint": "^8.0.3",
"eslint": "^4.13.1", "eslint": "^4.13.1",
"eslint-config-pubsweet": "^0.0.6", "eslint-config-pubsweet": "^0.0.6",
"eslint-plugin-import": "^2.8.0", "eslint-plugin-import": "^2.8.0",
...@@ -14,32 +97,71 @@ ...@@ -14,32 +97,71 @@
"eslint-plugin-promise": "^3.6.0", "eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "^7.4.0", "eslint-plugin-react": "^7.4.0",
"eslint-plugin-standard": "^3.0.1", "eslint-plugin-standard": "^3.0.1",
"lerna": "^2.5.1",
"lint-staged": "^6.0.0", "lint-staged": "^6.0.0",
"prettier": "^1.8.2", "prettier": "^1.8.2",
"stylelint": "^8.2.0",
"stylelint-config-prettier": "^2.0.0", "stylelint-config-prettier": "^2.0.0",
"stylelint-config-pubsweet": "^0.0.3" "eslint-loader": "^1.6.0",
"extract-text-webpack-plugin": "^3.0.0",
"faker": "^4.1.0",
"file-loader": "^1.1.5",
"fs-extra": "^5.0.0",
"html-webpack-plugin": "^2.24.0",
"husky": "^0.14.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^18.1.0",
"joi-browser": "^10.0.6",
"json-loader": "^0.5.4",
"node-sass": "^4.5.2",
"pouchdb-adapter-memory": "^6.1.1",
"react-addons-test-utils": "^15.4.2",
"react-hot-loader": "^3.1.1",
"react-router-redux": "^5.0.0-alpha.9",
"react-test-renderer": "^15.4.2",
"regenerator-runtime": "^0.11.0",
"sass-loader": "^6.0.3",
"script-loader": "^0.7.0",
"sinon": "^1.17.7",
"sinon-as-promised": "^4.0.2",
"smtp-server": "^3.3.0",
"standard": "^10.0.1",
"string-replace-loader": "^1.3.0",
"style-loader": "^0.19.0",
"stylelint": "^8.2.0",
"stylelint-config-pubsweet": "^0.0.3",
"testcafe": "^0.18.6",
"testcafe-react-selectors": "^1.0.5",
"uglifyjs-webpack-plugin": "^1.1.2",
"url-loader": "^0.6.2",
"webpack": "^3.8.1",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.20.0",
"winston-daily-rotate-file": "^3.2.1"
}, },
"license": "MIT", "jest": {
"name": "ucp-monorepo", "moduleNameMapper": {
"private": true, "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "./test/fileMock.js",
"repository": { "\\.(css|less|scss)$": "identity-obj-proxy"
"type": "git", },
"url": "git@gitlab.coko.foundation:editoria/ucp.git" "setupFiles": [
"./test/jest.config.js"
],
"snapshotSerializers": [
"./node_modules/enzyme-to-json/serializer"
],
"transformIgnorePatterns": [
"node_modules/(?!pubsweet-frontend)",
"__snapshots__"
]
}, },
"scripts": { "scripts": {
"bootstrap": "lerna bootstrap", "setupdb": "pubsweet setupdb ./",
"clean": "lerna clean", "start": "pubsweet start",
"publish": "lerna publish", "server": "pubsweet start",
"updated": "lerna updated", "resetdb": "pubsweet setupdb --clobber ./",
"test": "lerna run test" "start:services": "docker-compose up postgres",
}, "test": "NODE_ENV=test jest",
"version": "0.0.0", "test:watch": "NODE_ENV=test jest --watch",
"dependencies": { "test:cover": "NODE_ENV=test jest --coverage",
"babel-preset-stage-0": "^6.24.1" "build": "NODE_ENV=production pubsweet build"
}, }
"workspaces": [
"packages/*"
]
} }
**/_build
**/node_modules
**/coverage
{
"parser": "babel-eslint",
"env": {
"es6": true,
"browser": true
},
"extends": ["pubsweet"],
"rules": {
"import/no-dynamic-require": 0,
"import/no-extraneous-dependencies": 0,
"sort-keys": 0
},
"overrides": [
{
"files": ["test/**/*.test.js"],
"globals": {
"fixture": true,
"text": true
}
}
]
}
# Created by https://www.gitignore.io/api/osx,node
### OSX ###
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Node ###
# Logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules
jspm_packages
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# IDEs
.idea
# pubsweet-specific
myapp
testapp
api/db/*
/data
!api/db/.gitkeep
.vscode
.wallaby.js
logs
.env.*
_build
coverage/
yarn-error.log
package-lock.json
config/local*.*
config/*.env
### Editoria 1.0, July 2017
Editoria was started as a collaboration between UCP and Coko, initial funding came from the Mellon Foundation.
Those involved in conceptualising, designing, and building Editoria (including the Wax Editor) from 0 to 1.0 include:
* Erich van Rijn
* Catherine Mitchell
* Kate Warne
* Cindy Fulton
* Lisa Schiff
* Justin Gonder
* Juliana Froggatt
* Adam Hyde
* Kristen Ratan
* Yannis Barlas
* Christos Kokosias
* Julien Taquet
* Alex Theg
* Alexandros Georgantas
* Giannis Kopanas
MIT License
Copyright (c) 2017 University of California Press
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
{
"name": "UCP",
"description": "An application for managing book production flows",
"private": true,
"keywords": [
"Coko",
"Coko Foundation",
"UCP",
"University of California Press",
"book",
"book production",
"book management"
],
"repository": {
"type": "git",
"url": "https://gitlab.coko.foundation/editoria/ucp"
},
"homepage": "https://editoria.pub/",
"license": "MIT",
"version": "1.0.0",
"dependencies": {
"@pubsweet/component-polling-client": "^0.0.3",
"@pubsweet/component-polling-server": "^0.0.7",
"@pubsweet/db-manager": "^1.0.7",
"@pubsweet/default-theme": "^0.2.0",
"@pubsweet/logger": "^0.2.2",
"@pubsweet/ui": "^4.1.3",
"authsome": "^0.1.0",
"font-awesome": "4.7.0",
"history": "^4.7.2",
"lodash": "4.17.4",
"prop-types": "^15.6.0",
"pubsweet": "^2.2.8",
"pubsweet-client": "^2.5.5",
"pubsweet-component-bookbuilder": "^1.1.1",
"pubsweet-component-editoria-dashboard": "^0.1.1",
"pubsweet-component-epub": "^0.5.0",
"pubsweet-component-epub-frontend": "^0.1.3",
"pubsweet-component-ink-backend": "^0.1.1",
"pubsweet-component-ink-frontend": "^0.2.3",
"pubsweet-component-login": "^0.5.5",
"pubsweet-component-manage": "^1.0.0",
"pubsweet-component-navigation": "^1.0.1",
"pubsweet-component-password-reset-backend": "1.0.0",
"pubsweet-component-password-reset-frontend": "1.0.0",
"pubsweet-component-signup": "^0.4.1",
"pubsweet-component-teams-manager": "1.0.0",
"pubsweet-component-theme-editoria": "^0.0.5",
"pubsweet-component-users-manager": "1.0.0",
"pubsweet-component-vivliostyle-viewer": "^1.0.0",
"pubsweet-component-pagedjs-viewer": "^0.1.1",
"pubsweet-component-wax": "^0.6.12",
"pubsweet-editoria-authsome": "^1.0.1",
"pubsweet-server": "^7.2.0",
"pubsweet-theme-plugin": "^0.0.3",
"react": "^16.2.0",
"react-bootstrap": "0.32.1",
"react-dnd": "2.5.4",
"react-dnd-html5-backend": "2.5.4",
"react-dom": "^16.2.0",
"react-redux": "5.0.4",
"react-router-bootstrap": "0.24.4",
"react-router-dom": "^4.2.2",
"recompose": "^0.26.0",
"redux": "3.6.0",
"typeface-fira-sans": "^0.0.43"
},
"devDependencies": {
"app-module-path": "^2.2.0",
"autobind-decorator": "^1.3.4",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.2",
"babel-loader": "^7.1.2",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-babili": "0.0.12",
"babel-preset-env": "^1.6.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2015-native-modules": "^6.9.4",
"babel-preset-minify": "^0.3.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babili-webpack-plugin": "^0.0.11",
"bootstrap-sass": "^3.3.7",
"clean-webpack-plugin": "^0.1.17",
"compression-webpack-plugin": "^1.1.6",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.4",
"enzyme": "^2.7.1",
"enzyme-to-json": "^1.4.5",
"eslint": "^4.12.0",
"eslint-config-pubsweet": "^0.0.6",
"eslint-loader": "^1.6.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jest": "^21.4.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-standard": "^3.0.1",
"extract-text-webpack-plugin": "^3.0.0",
"faker": "^4.1.0",
"file-loader": "^1.1.5",
"fs-extra": "^5.0.0",
"html-webpack-plugin": "^2.24.0",
"husky": "^0.14.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^18.1.0",