1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-09 12:19:49 +01:00

update dependencies

This commit is contained in:
Enrico Fasoli 2019-03-09 16:08:57 +01:00
parent 6eaebebcf7
commit e9903eac00
No known key found for this signature in database
GPG Key ID: 1238873C5F27DB4D
8 changed files with 23615 additions and 9528 deletions

View File

@ -43,9 +43,9 @@ The UI is being implemented using semantic-ui-react
Clone this repo, then run Clone this repo, then run
- `yarn` to install dependencies - `npm install` to install dependencies
- `yarn start` to start a development server - `npm start` to start a development server
- `yarn run build` to create a production build - `npm run build` to create a production build
## Old Version ## Old Version

23580
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,31 +4,33 @@
"homepage": ".", "homepage": ".",
"private": true, "private": true,
"dependencies": { "dependencies": {
"ipfs": "^0.27.7", "connected-react-router": "^6.3.1",
"moment": "^2.20.1", "ipfs": "~0.33.0",
"orbit-db": "^0.19.4", "moment": "^2.24.0",
"orbit-db": "~0.19.9",
"orbit-db-discussion-board": "https://github.com/fazo96/orbit-db-discussion-board.git", "orbit-db-discussion-board": "https://github.com/fazo96/orbit-db-discussion-board.git",
"react": "^16.2.0", "react": "^16.8.4",
"react-dom": "^16.2.0", "react-dom": "^16.8.4",
"react-hot-loader": "^3.1.3", "react-hot-loader": "^4.8.0",
"react-redux": "^5.0.6", "react-redux": "^6.0.1",
"react-router-dom": "^4.2.2", "react-router-dom": "^4.3.1",
"react-router-redux": "^5.0.0-alpha.9", "react-scripts": "2.1.8",
"react-scripts": "1.1.0", "redux": "^4.0.1",
"redux": "^3.7.2", "redux-saga": "^1.0.2",
"redux-saga": "^0.16.0", "semantic-ui-css": "^2.4.1",
"semantic-ui-css": "^2.2.14", "semantic-ui-react": "^0.85.0"
"semantic-ui-react": "^0.77.2"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",
"build": "react-scripts build", "build": "react-scripts build"
"prebuild": "cp webpack.config.prod.js node_modules/react-scripts/config",
"postbuild": "npx uglify-es build/static/js/main.*.js -o build/static/js/$(ls build/static/js | head -n 1)",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}, },
"devDependencies": { "devDependencies": {
"redux-immutable-state-invariant": "^2.1.0" "redux-immutable-state-invariant": "^2.1.0"
} },
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
} }

View File

@ -6,7 +6,7 @@ import configureStore, { history } from './store/configureStore'
import App from './components/App' import App from './components/App'
import registerServiceWorker from './registerServiceWorker' import registerServiceWorker from './registerServiceWorker'
import { Provider } from 'react-redux' import { Provider } from 'react-redux'
import { ConnectedRouter } from 'react-router-redux' import { ConnectedRouter } from 'connected-react-router'
import { start } from './orbitdb' import { start } from './orbitdb'
const store = configureStore(); const store = configureStore();

View File

@ -1,11 +1,11 @@
import { combineReducers } from 'redux' import { combineReducers } from 'redux'
import { routerReducer } from 'react-router-redux' import { connectRouter} from 'connected-react-router'
import postReducer from './post' import postReducer from './post'
import boardsReducer from './boards' import boardsReducer from './boards'
import openBoardReducer from './openboard' import openBoardReducer from './openboard'
export default combineReducers({ export default history => combineReducers({
router: routerReducer, router: connectRouter(history),
postEditor: postReducer, postEditor: postReducer,
boards: boardsReducer, boards: boardsReducer,
openBoard: openBoardReducer openBoard: openBoardReducer

View File

@ -17,11 +17,3 @@ export function* editPost({ address, postId, post }) {
yield goToBoard({ board: { address } }); yield goToBoard({ board: { address } });
// TODO: goto post // TODO: goto post
} }
export function* editPost({ address, postId, post }) {
const db = window.dbs[address]
const { title, text } = post
yield apply(db, db.updatePost, [postId, { title, text }])
yield goToBoard({ board: { address } });
// TODO: goto post
}

View File

@ -3,22 +3,20 @@ import reduxImmutableStateInvariant from 'redux-immutable-state-invariant';
import createSagaMiddleware from 'redux-saga'; import createSagaMiddleware from 'redux-saga';
import saga from '../sagas'; import saga from '../sagas';
import createHistory from 'history/createHashHistory'; import createHistory from 'history/createHashHistory';
// 'routerMiddleware': the new way of storing route changes with redux middleware since rrV4. import { routerMiddleware } from 'connected-react-router';
import { routerMiddleware } from 'react-router-redux'; import createRootReducer from '../reducers';
import rootReducer from '../reducers';
const sagaMiddleware = createSagaMiddleware(); const sagaMiddleware = createSagaMiddleware();
export const history = createHistory(); export const history = createHistory();
function configureStoreProd(initialState) { function configureStoreProd(initialState) {
const reactRouterMiddleware = routerMiddleware(history);
const middlewares = [ const middlewares = [
reactRouterMiddleware, routerMiddleware(history),
sagaMiddleware, sagaMiddleware,
]; ];
const store = createStore(rootReducer, initialState, compose( const store = createStore(createRootReducer(history), initialState, compose(
applyMiddleware(...middlewares) applyMiddleware(...middlewares)
) )
); );
@ -29,16 +27,15 @@ function configureStoreProd(initialState) {
} }
function configureStoreDev(initialState) { function configureStoreDev(initialState) {
const reactRouterMiddleware = routerMiddleware(history);
const middlewares = [ const middlewares = [
// Redux middleware that spits an error on you when you try to mutate your state either inside a dispatch or between dispatches. // Redux middleware that spits an error on you when you try to mutate your state either inside a dispatch or between dispatches.
reduxImmutableStateInvariant(), reduxImmutableStateInvariant(),
reactRouterMiddleware, routerMiddleware(history),
sagaMiddleware, sagaMiddleware,
]; ];
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; // add support for Redux dev tools const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; // add support for Redux dev tools
const store = createStore(rootReducer, initialState, composeEnhancers( const store = createStore(createRootReducer(history), initialState, composeEnhancers(
applyMiddleware(...middlewares) applyMiddleware(...middlewares)
) )
); );

9484
yarn.lock

File diff suppressed because it is too large Load Diff