Skip to content

change to npm tasks; sync packages with redux #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
"description": "Redux bindings for React",
"main": "./lib/index.js",
"scripts": {
"browser": "scripts/browser",
"build": "scripts/build",
"clean": "scripts/clean",
"lint": "scripts/lint",
"prepublish": "scripts/prepublish",
"test": "scripts/test",
"test:watch": "scripts/test-watch",
"test:cov": "scripts/test-cov"
"build:lib": "babel src --out-dir lib",
"build:umd": "webpack src/index.js dist/react-redux.js --config webpack.config.development.js",
"build:umd:min": "webpack src/index.js dist/react-redux.min.js --config webpack.config.production.js",
"build": "npm run build:lib && npm run build:umd && npm run build:umd:min",
"clean": "rimraf lib dist coverage",
"lint": "eslint src test",
"prepublish": "npm run clean && npm run build",
"test": "mocha --compilers js:babel/register --recursive",
"test:watch": "npm test -- --watch",
"test:cov": "babel-node ./node_modules/isparta/bin/isparta cover ./node_modules/mocha/bin/_mocha -- --recursive"
},
"repository": {
"type": "git",
Expand All @@ -36,14 +38,15 @@
"homepage": "https://github.com/gaearon/react-redux",
"devDependencies": {
"babel": "^5.5.8",
"babel-core": "5.6.15",
"babel-core": "5.6.18",
"babel-eslint": "^3.1.15",
"babel-loader": "^5.1.4",
"eslint": "^0.23",
"eslint-config-airbnb": "0.0.6",
"eslint-plugin-react": "^2.3.0",
"expect": "^1.6.0",
"istanbul": "^0.3.15",
"expect": "^1.8.0",
"isparta": "^3.0.3",
"istanbul": "^0.3.17",
"jsdom": "~5.4.3",
"mocha": "^2.2.5",
"mocha-jsdom": "~0.4.0",
Expand Down
8 changes: 0 additions & 8 deletions scripts/browser

This file was deleted.

4 changes: 0 additions & 4 deletions scripts/build

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/clean

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/lint

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/prepublish

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/test

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/test-cov

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/test-watch

This file was deleted.

19 changes: 0 additions & 19 deletions webpack.config.js → webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@

var webpack = require('webpack');

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

if (process.env.NODE_ENV === 'production') {
plugins.push(
new webpack.optimize.UglifyJsPlugin({
compressor: {
screw_ie8: true,
warnings: false
}
})
);
}

var reactExternal = {
root: 'React',
commonjs2: 'react',
Expand Down Expand Up @@ -49,7 +31,6 @@ module.exports = {
library: 'ReactRedux',
libraryTarget: 'umd'
},
plugins: plugins,
resolve: {
extensions: ['', '.js']
}
Expand Down
14 changes: 14 additions & 0 deletions webpack.config.development.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

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;
20 changes: 20 additions & 0 deletions webpack.config.production.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict';

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;