Skip to content

Commit

Permalink
Merge pull request #611 from jdalton/lodash
Browse files Browse the repository at this point in the history
Use lodash v4
  • Loading branch information
gaearon committed Jan 31, 2016
2 parents 18b47c5 + 33a228c commit c3fe3ee
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 75 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -59,6 +59,7 @@
},
"homepage": "http://rackt.github.io/redux",
"dependencies": {
"lodash": "^4.1.0",
"loose-envify": "^1.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/combineReducers.js
@@ -1,5 +1,5 @@
import { ActionTypes } from './createStore'
import isPlainObject from './utils/isPlainObject'
import isPlainObject from 'lodash/isPlainObject'
import warning from './utils/warning'

function getUndefinedStateErrorMessage(key, action) {
Expand Down
2 changes: 1 addition & 1 deletion src/createStore.js
@@ -1,4 +1,4 @@
import isPlainObject from './utils/isPlainObject'
import isPlainObject from 'lodash/isPlainObject'

/**
* These are private action types reserved by Redux.
Expand Down
24 changes: 0 additions & 24 deletions src/utils/isPlainObject.js

This file was deleted.

22 changes: 0 additions & 22 deletions test/utils/isPlainObject.spec.js

This file was deleted.

8 changes: 5 additions & 3 deletions webpack.config.base.js
@@ -1,5 +1,7 @@
'use strict';

var webpack = require('webpack');

module.exports = {
module: {
loaders: [
Expand All @@ -10,7 +12,7 @@ module.exports = {
library: 'Redux',
libraryTarget: 'umd'
},
resolve: {
extensions: ['', '.js']
}
plugins: [
new webpack.optimize.OccurenceOrderPlugin()
]
};
17 changes: 8 additions & 9 deletions webpack.config.development.js
@@ -1,14 +1,13 @@
'use strict';

var _ = require('lodash');
var webpack = require('webpack');
var baseConfig = require('./webpack.config.base');

var config = Object.create(baseConfig);
config.plugins = [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development')
})
];

module.exports = config;
module.exports = _.merge({}, baseConfig, {
plugins: baseConfig.plugins.concat(
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"development"'
})
)
});
32 changes: 17 additions & 15 deletions webpack.config.production.js
@@ -1,20 +1,22 @@
'use strict';

var _ = require('lodash');
var webpack = require('webpack');
var baseConfig = require('./webpack.config.base');

var config = Object.create(baseConfig);
config.plugins = [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new webpack.optimize.UglifyJsPlugin({
compressor: {
screw_ie8: true,
warnings: false
}
})
];

module.exports = config;
module.exports = _.merge({}, baseConfig, {
plugins: baseConfig.plugins.concat(
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"'
}),
new webpack.optimize.UglifyJsPlugin({
compressor: {
pure_getters: true,
unsafe: true,
unsafe_comps: true,
screw_ie8: true,
warnings: false
}
})
)
});

0 comments on commit c3fe3ee

Please sign in to comment.