mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-21 17:16:42 +03:00
We don't need an UMD build here
This commit is contained in:
parent
2c7c3232e3
commit
de43b2e110
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,6 +1,5 @@
|
|||
node_modules
|
||||
*.log
|
||||
.DS_Store
|
||||
dist
|
||||
lib
|
||||
coverage
|
||||
|
|
13
package.json
13
package.json
|
@ -4,14 +4,13 @@
|
|||
"description": "Redux DevTools with hot reloading and time travel",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"clean": "rimraf lib dist",
|
||||
"clean": "rimraf lib",
|
||||
"build": "babel src --out-dir lib",
|
||||
"build:umd": "webpack src/index.js dist/redux-devtools.js && NODE_ENV=production webpack src/index.js dist/redux-devtools.min.js",
|
||||
"lint": "eslint src test examples",
|
||||
"test": "NODE_ENV=test mocha --compilers js:babel/register --recursive",
|
||||
"test:watch": "NODE_ENV=test mocha --compilers js:babel/register --recursive --watch",
|
||||
"test:cov": "babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive",
|
||||
"prepublish": "npm run lint && npm run test && npm run clean && npm run build && npm run build:umd"
|
||||
"prepublish": "npm run lint && npm run test && npm run clean && npm run build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -42,11 +41,13 @@
|
|||
"expect": "^1.6.0",
|
||||
"isparta": "^3.0.3",
|
||||
"mocha": "^2.2.5",
|
||||
"rimraf": "^2.3.4",
|
||||
"webpack": "^1.9.6",
|
||||
"webpack-dev-server": "^1.8.2"
|
||||
"rimraf": "^2.3.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"redux": "^1.0.0 || 1.0.0-rc"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-redux": "^0.2.2",
|
||||
"redux": "^1.0.0-rc"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var webpack = require('webpack');
|
||||
|
||||
var plugins = [
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
|
||||
})
|
||||
];
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
plugins.push(
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compressor: {
|
||||
screw_ie8: true,
|
||||
warnings: false
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
var reactExternal = {
|
||||
root: 'React',
|
||||
commonjs2: 'react',
|
||||
commonjs: 'react',
|
||||
amd: 'react'
|
||||
};
|
||||
|
||||
var reduxExternal = {
|
||||
root: 'Redux',
|
||||
commonjs2: 'redux',
|
||||
commonjs: 'redux',
|
||||
amd: 'redux'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
externals: {
|
||||
'react': reactExternal,
|
||||
'react-native': reactExternal,
|
||||
'redux': reduxExternal
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.js$/,
|
||||
loaders: ['babel-loader'],
|
||||
exclude: /node_modules/
|
||||
}]
|
||||
},
|
||||
output: {
|
||||
library: 'ReduxDevTools',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
plugins: plugins,
|
||||
resolve: {
|
||||
extensions: ['', '.js']
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user