mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-01-09 12:19:49 +01:00
update dependencies
This commit is contained in:
parent
6eaebebcf7
commit
e9903eac00
@ -43,9 +43,9 @@ The UI is being implemented using semantic-ui-react
|
||||
|
||||
Clone this repo, then run
|
||||
|
||||
- `yarn` to install dependencies
|
||||
- `yarn start` to start a development server
|
||||
- `yarn run build` to create a production build
|
||||
- `npm install` to install dependencies
|
||||
- `npm start` to start a development server
|
||||
- `npm run build` to create a production build
|
||||
|
||||
## Old Version
|
||||
|
||||
|
23580
package-lock.json
generated
Normal file
23580
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
42
package.json
42
package.json
@ -4,31 +4,33 @@
|
||||
"homepage": ".",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"ipfs": "^0.27.7",
|
||||
"moment": "^2.20.1",
|
||||
"orbit-db": "^0.19.4",
|
||||
"connected-react-router": "^6.3.1",
|
||||
"ipfs": "~0.33.0",
|
||||
"moment": "^2.24.0",
|
||||
"orbit-db": "~0.19.9",
|
||||
"orbit-db-discussion-board": "https://github.com/fazo96/orbit-db-discussion-board.git",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-hot-loader": "^3.1.3",
|
||||
"react-redux": "^5.0.6",
|
||||
"react-router-dom": "^4.2.2",
|
||||
"react-router-redux": "^5.0.0-alpha.9",
|
||||
"react-scripts": "1.1.0",
|
||||
"redux": "^3.7.2",
|
||||
"redux-saga": "^0.16.0",
|
||||
"semantic-ui-css": "^2.2.14",
|
||||
"semantic-ui-react": "^0.77.2"
|
||||
"react": "^16.8.4",
|
||||
"react-dom": "^16.8.4",
|
||||
"react-hot-loader": "^4.8.0",
|
||||
"react-redux": "^6.0.1",
|
||||
"react-router-dom": "^4.3.1",
|
||||
"react-scripts": "2.1.8",
|
||||
"redux": "^4.0.1",
|
||||
"redux-saga": "^1.0.2",
|
||||
"semantic-ui-css": "^2.4.1",
|
||||
"semantic-ui-react": "^0.85.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"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"
|
||||
"build": "react-scripts build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"redux-immutable-state-invariant": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not ie <= 11",
|
||||
"not op_mini all"
|
||||
]
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import configureStore, { history } from './store/configureStore'
|
||||
import App from './components/App'
|
||||
import registerServiceWorker from './registerServiceWorker'
|
||||
import { Provider } from 'react-redux'
|
||||
import { ConnectedRouter } from 'react-router-redux'
|
||||
import { ConnectedRouter } from 'connected-react-router'
|
||||
import { start } from './orbitdb'
|
||||
|
||||
const store = configureStore();
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { combineReducers } from 'redux'
|
||||
import { routerReducer } from 'react-router-redux'
|
||||
import { connectRouter} from 'connected-react-router'
|
||||
import postReducer from './post'
|
||||
import boardsReducer from './boards'
|
||||
import openBoardReducer from './openboard'
|
||||
|
||||
export default combineReducers({
|
||||
router: routerReducer,
|
||||
export default history => combineReducers({
|
||||
router: connectRouter(history),
|
||||
postEditor: postReducer,
|
||||
boards: boardsReducer,
|
||||
openBoard: openBoardReducer
|
||||
|
@ -10,14 +10,6 @@ export function* addPost({ address, 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
|
||||
}
|
||||
|
||||
export function* editPost({ address, postId, post }) {
|
||||
const db = window.dbs[address]
|
||||
const { title, text } = post
|
||||
|
@ -3,22 +3,20 @@ import reduxImmutableStateInvariant from 'redux-immutable-state-invariant';
|
||||
import createSagaMiddleware from 'redux-saga';
|
||||
import saga from '../sagas';
|
||||
import createHistory from 'history/createHashHistory';
|
||||
// 'routerMiddleware': the new way of storing route changes with redux middleware since rrV4.
|
||||
import { routerMiddleware } from 'react-router-redux';
|
||||
import rootReducer from '../reducers';
|
||||
import { routerMiddleware } from 'connected-react-router';
|
||||
import createRootReducer from '../reducers';
|
||||
|
||||
const sagaMiddleware = createSagaMiddleware();
|
||||
|
||||
export const history = createHistory();
|
||||
|
||||
function configureStoreProd(initialState) {
|
||||
const reactRouterMiddleware = routerMiddleware(history);
|
||||
const middlewares = [
|
||||
reactRouterMiddleware,
|
||||
routerMiddleware(history),
|
||||
sagaMiddleware,
|
||||
];
|
||||
|
||||
const store = createStore(rootReducer, initialState, compose(
|
||||
const store = createStore(createRootReducer(history), initialState, compose(
|
||||
applyMiddleware(...middlewares)
|
||||
)
|
||||
);
|
||||
@ -29,16 +27,15 @@ function configureStoreProd(initialState) {
|
||||
}
|
||||
|
||||
function configureStoreDev(initialState) {
|
||||
const reactRouterMiddleware = routerMiddleware(history);
|
||||
const middlewares = [
|
||||
// Redux middleware that spits an error on you when you try to mutate your state either inside a dispatch or between dispatches.
|
||||
reduxImmutableStateInvariant(),
|
||||
reactRouterMiddleware,
|
||||
routerMiddleware(history),
|
||||
sagaMiddleware,
|
||||
];
|
||||
|
||||
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)
|
||||
)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user