Skip to content

Commit 4609346

Browse files
authored
Merge pull request #7 from sugarshin/update-dependencies
Update dependencies
2 parents 0d5625a + cd7b2f5 commit 4609346

File tree

6 files changed

+1362
-871
lines changed

6 files changed

+1362
-871
lines changed

.flowconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[ignore]
22
.*/node_modules/promise/
33
.*/node_modules/draft-js/lib/DraftEditor.react.js.flow
4+
.*/node_modules/draft-js/lib/ContentBlock.js.flow
5+
.*/node_modules/draft-js/lib/ContentBlockNode.js.flow
46

57
[include]
68

example/App.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { Component } from 'react'
2+
import { hot } from 'react-hot-loader'
23
import Fork from 'react-ghfork'
34
import hljs from 'highlight.js'
45
import code from './example-code'
@@ -8,7 +9,7 @@ import 'react-ghfork/gh-fork-ribbon.css'
89
import 'highlight.js/styles/github.css'
910
import './App.styl'
1011

11-
export default class App extends Component {
12+
class App extends Component {
1213
componentDidMount() {
1314
this.demoEditor.focus()
1415
Array.from(document.querySelectorAll('pre')).forEach(el => hljs.highlightBlock(el))
@@ -25,3 +26,5 @@ export default class App extends Component {
2526
)
2627
}
2728
}
29+
30+
export default hot(module)(App)

example/index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react'
22
import ReactDOM from 'react-dom'
3-
import { AppContainer } from 'react-hot-loader'
43
import App from './App'
54

65
const main = () => {
@@ -10,14 +9,7 @@ const main = () => {
109
document.head.appendChild(meta)
1110

1211
const root = document.body.appendChild(document.createElement('div'))
13-
ReactDOM.render(<AppContainer><App /></AppContainer> , root)
14-
15-
if (module.hot) {
16-
module.hot.accept('./App', () => {
17-
const NextApp = require('./App').default
18-
ReactDOM.render(<AppContainer><NextApp /></AppContainer>, root)
19-
})
20-
}
12+
ReactDOM.render(<App />, root)
2113
}
2214

2315
main()

package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,57 +33,57 @@
3333
"predocs": "npm run clean:build; mkdir -p build && npm run favicon",
3434
"docs": "NODE_ENV=production webpack --progress",
3535
"postdocs": "gh-pages -x -m 'Update [ci skip]' -d build -r https://github.com/sugarshin/draft-js-checkable-list-plugin.git",
36-
"prepublish": "npm run lint && npm run type && npm run test:coverage && NODE_ENV=production BABEL_ENV=production npm run build"
36+
"prepublishOnly": "npm run lint && npm run type && npm run test:coverage && NODE_ENV=production BABEL_ENV=production npm run build"
3737
},
3838
"repository": "git@github.com:sugarshin/draft-js-checkable-list-plugin.git",
3939
"author": "Shingo Sato <shinsugar@gmail.com>",
4040
"license": "MIT",
4141
"dependencies": {
4242
"decorate-component-with-props": "^1.1.0",
43-
"draft-js-checkable-list-item": "^3.0.0",
43+
"draft-js-checkable-list-item": "^3.0.1",
4444
"immutable": "~3.7.4",
4545
"union-class-names": "^1.0.0"
4646
},
4747
"devDependencies": {
48-
"@babel/cli": "^7.0.0-beta.36",
49-
"@babel/core": "^7.0.0-beta.36",
50-
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.36",
51-
"@babel/polyfill": "^7.0.0-beta.36",
52-
"@babel/preset-es2015": "^7.0.0-beta.36",
53-
"@babel/preset-es2016": "^7.0.0-beta.36",
54-
"@babel/preset-react": "^7.0.0-beta.36",
55-
"@babel/preset-stage-2": "^7.0.0-beta.36",
48+
"@babel/cli": "^7.0.0-beta.40",
49+
"@babel/core": "^7.0.0-beta.40",
50+
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.40",
51+
"@babel/polyfill": "^7.0.0-beta.40",
52+
"@babel/preset-es2015": "^7.0.0-beta.40",
53+
"@babel/preset-es2016": "^7.0.0-beta.40",
54+
"@babel/preset-react": "^7.0.0-beta.40",
55+
"@babel/preset-stage-2": "^7.0.0-beta.40",
5656
"babel-core": "^7.0.0-0",
57-
"babel-eslint": "^8.1.2",
58-
"babel-jest": "^22.0.4",
57+
"babel-eslint": "^8.2.2",
58+
"babel-jest": "^22.4.0",
5959
"babel-loader": "^8.0.0-beta.0",
6060
"coveralls": "^3.0.0",
61-
"css-loader": "^0.28.7",
62-
"draft-js": "~0.10.4",
61+
"css-loader": "^0.28.9",
62+
"draft-js": "~0.10.5",
6363
"draft-js-plugins-editor": "^2.0.4",
6464
"enzyme": "^3.3.0",
6565
"enzyme-adapter-react-16": "^1.1.1",
66-
"eslint": "^4.14.0",
66+
"eslint": "^4.18.1",
6767
"eslint-plugin-babel": "^4.1.2",
68-
"eslint-plugin-flowtype": "^2.40.1",
69-
"eslint-plugin-react": "^7.5.1",
70-
"flow-bin": "^0.62.0",
68+
"eslint-plugin-flowtype": "^2.45.0",
69+
"eslint-plugin-react": "^7.7.0",
70+
"flow-bin": "^0.66.0",
7171
"gh-pages": "^1.1.0",
7272
"highlight.js": "^9.12.0",
7373
"html-webpack-plugin": "^2.30.1",
74-
"jest": "^22.0.4",
74+
"jest": "^22.4.0",
7575
"raf": "^3.4.0",
7676
"react": "^16.2.0",
7777
"react-dom": "^16.2.0",
7878
"react-ghfork": "^0.5.1",
79-
"react-hot-loader": "^3.1.3",
79+
"react-hot-loader": "^4.0.0-rc.0",
8080
"react-test-renderer": "^16.2.0",
8181
"regenerator-runtime": "^0.11.1",
82-
"style-loader": "^0.19.1",
82+
"style-loader": "^0.20.2",
8383
"stylus": "^0.54.5",
8484
"stylus-loader": "^3.0.1",
85-
"webpack": "^3.10.0",
86-
"webpack-dev-server": "^2.9.7"
85+
"webpack": "^3.11.0",
86+
"webpack-dev-server": "^2.11.1"
8787
},
8888
"peerDependencies": {
8989
"draft-js": "~0.10.1",

webpack.config.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,8 @@ if (production) {
3131
new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false, screw_ie8: true } })
3232
)
3333
} else {
34-
entry.unshift(
35-
`webpack-dev-server/client?http://localhost:${PORT}`,
36-
'webpack/hot/only-dev-server',
37-
'react-hot-loader/patch'
38-
)
3934
plugins.push(
35+
new webpack.NamedModulesPlugin(),
4036
new webpack.HotModuleReplacementPlugin()
4137
)
4238
}

0 commit comments

Comments
 (0)