Skip to content

Commit

Permalink
housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
Contra committed Oct 2, 2017
1 parent 8ff7425 commit 14004ab
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 5,302 deletions.
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
## Change Log

### upcoming (2017/07/14 21:36 +00:00)
### upcoming (2017/10/02 19:22 +00:00)
- [#120](https://github.com/contra/react-responsive/pull/120) support react 16. (@whatknight)
- [6b300d7](https://github.com/contra/react-responsive/commit/6b300d7cc1bb340afa14eb046290a5d03064120b) Merge branch 'master' into react16 (@contra)
- [#119](https://github.com/contra/react-responsive/pull/119) Housekeeping (@whatknight)
- [#121](https://github.com/contra/react-responsive/pull/121) Update README.txt (@vpicone)
- [1d19af9](https://github.com/contra/react-responsive/commit/1d19af9a5e6ddf5baf11eb27f455165430cdd405) Update README.txt (@vpicone)
- [bb69da2](https://github.com/contra/react-responsive/commit/bb69da2e74b615132dd30c4eecad2b88080e5287) support react 16. (@whatknight)
- [e78cab9](https://github.com/contra/react-responsive/commit/e78cab9fafceb30195ffca6858df35560f3675b6) bump sinon (@whatknight)
- [9429386](https://github.com/contra/react-responsive/commit/9429386ce0891c1904baadf725837e0a3f282746) remove transform runtime (@whatknight)
- [8380bd9](https://github.com/contra/react-responsive/commit/8380bd91c3fbb73957f7410bd2512266f7c7053a) update webpack (@whatknight)
- [307b31d](https://github.com/contra/react-responsive/commit/307b31d16cf4d336f50ad4c53739166e4bd1d80e) update babel config (@whatknight)
- [48b2a33](https://github.com/contra/react-responsive/commit/48b2a33ad9a6c61fbbbac6dad6f54838f949d61a) update test deps (@whatknight)
- [81d9d18](https://github.com/contra/react-responsive/commit/81d9d181d08634527b49bb62c66f5b2c72e606f1) update eslint (@whatknight)
- [#117](https://github.com/contra/react-responsive/pull/117) Update README.md (@modosc)
- [0b4d019](https://github.com/contra/react-responsive/commit/0b4d0197d1011c3e5899cc6003556a6526350bc1) Update README.md (@modosc)
- [c55a77e](https://github.com/contra/react-responsive/commit/c55a77ec86c2db7d2aae4a3e67a08dba09a3a455) closes #116 (@contra)

### v1.3.4 (2017/07/14 21:36 +00:00)
- [c93ac7a](https://github.com/contra/react-responsive/commit/c93ac7a696a8d3f0f8a5b71ce7836375de13a28d) 1.3.4 (@contra)
- [#109](https://github.com/contra/react-responsive/pull/109) fix Cannot read property 'removeListener' of undefined (@modosc)
- [ea3d577](https://github.com/contra/react-responsive/commit/ea3d5774bc59fa06ad50d60e582a9f6da94b9bd5) update matchmediaquery@^0.2.1 (@modosc)
- [3687115](https://github.com/contra/react-responsive/commit/3687115de3603cfb32eb5f3e4d3b9883b12f3ed3) fix Cannot read property 'removeListener' of undefined (@modosc)
Expand Down
2 changes: 1 addition & 1 deletion dist/react-responsive.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/react-responsive.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/react-responsive.min.js.map

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
"github-changes": "^1.0.4",
"jsdom": "^11.2.0",
"mocha": "^3.5.3",
"react": "^16.0.0",
"react-dom": "^0.14.0 || ^16.0.0",
"react": ">=0.14.0",
"react-dom": ">=0.14.0",
"should": "^13.0.1",
"sinon": "^4.0.0",
"webpack": "^3.5.6",
"webpack-dev-server": "^2.8.1"
},
"scripts": {
"preversion": "npm run clean && npm run build && npm docs",
"preversion": "npm run clean && npm run build",
"postversion": "npm run changelog",
"start": "webpack-dev-server --config webpack.config.samples.js --content-base samples/sandbox/src --host 0.0.0.0 --hot --inline --port 3333",
"build:umd": "cross-env BUILD_MODE=umd webpack",
Expand All @@ -71,11 +71,7 @@
"clean": "rimraf dist",
"lint": "eslint src test",
"test": "cross-env NODE_PATH=$NODE_PATH:$PWD/src mocha -R spec --compilers js:babel-register --require ./test/setup.js test/*_test.js",
"changelog": "github-changes -o contra -r react-responsive -b master -f ./CHANGELOG.md --order-semver --use-commit-body",
"docs": "npm run docs:pre && npm run docs:build && npm run docs:publish",
"docs:pre": "gitbook install && rimraf _book",
"docs:build": "gitbook build -g contra/react-responsive",
"docs:publish": "cd _book && git init && git commit --allow-empty -m 'update book' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update book' && git push git@github.com:contra/react-responsive gh-pages --force"
"changelog": "github-changes -o contra -r react-responsive -b master -f ./CHANGELOG.md --order-semver --use-commit-body"
},
"babel": {
"presets": [
Expand Down
34 changes: 21 additions & 13 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
const path = require('path')
const webpack = require('webpack')

const plugins = [new webpack.EnvironmentPlugin({
const env = new webpack.EnvironmentPlugin({
NODE_ENV: process.env.BUILD_MODE == 'umd-min' ? 'production' : 'development'
})]
})
const uglify = new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
parellel: true
})

const filename = process.env.BUILD_MODE === 'umd'
? './dist/react-responsive.js'
: './dist/react-responsive.min.js'
const plugins = process.env.BUILD_MODE == 'umd-min'
? [ env, uglify ]
: [ env ]

module.exports = {
entry: './src/index.js',
output: {
filename: (process.env.BUILD_MODE == 'umd') ? './dist/react-responsive.js' :
'./dist/react-responsive.min.js',
sourceMapFilename: './dist/react-responsive.js.map',
filename,
sourceMapFilename: `${filename}.map`,
libraryTarget: 'umd',
library: 'MediaQuery'
},
Expand All @@ -19,13 +29,7 @@ module.exports = {
'react': 'umd react',
'react-dom': 'umd react-dom'
},
plugins: process.env.BUILD_MODE == 'umd-min' ? [
...plugins,
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
parellel: true
})
] : plugins,
plugins,
resolve: {
modules: [
path.resolve('src'),
Expand All @@ -34,7 +38,11 @@ module.exports = {
},
module: {
rules: [
{ test: [ /\.js$/, /\.jsx$/ ], use: 'babel-loader', exclude: /node_modules/ }
{
test: [ /\.js$/, /\.jsx$/ ],
use: 'babel-loader',
exclude: /node_modules/
}
]
},
node: {
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ conf.devServer = {
hot: true,
disableHostCheck: true
}
conf.plugins = [...conf.plugins, new webpack.HotModuleReplacementPlugin()]
conf.plugins = [ ...conf.plugins, new webpack.HotModuleReplacementPlugin() ]
conf.cache = true
conf.devtool = 'inline-source-map'

Expand Down

0 comments on commit 14004ab

Please sign in to comment.