fix(redux-slider-monitor): fix example build (#537)

This commit is contained in:
Nathan Bierema 2020-07-31 23:51:44 -04:00 committed by GitHub
parent e4404c9a28
commit a9122a132c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 39 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ build
coverage coverage
.idea .idea
.eslintcache .eslintcache
!packages/redux-slider-monitor/examples/todomvc/dist/

View File

@ -31,7 +31,8 @@
"packages/*", "packages/*",
"packages/react-json-tree/examples", "packages/react-json-tree/examples",
"packages/redux-devtools/examples/counter", "packages/redux-devtools/examples/counter",
"packages/redux-devtools/examples/todomvc" "packages/redux-devtools/examples/todomvc",
"packages/redux-slider-monitor/examples/todomvc"
], ],
"engines": { "engines": {
"node": ">=8.0.0" "node": ">=8.0.0"

View File

@ -1,10 +1,4 @@
{ {
"presets": [ "presets": ["@babel/preset-env", "@babel/preset-react"],
["es2015", { "modules": false }], "plugins": ["@babel/plugin-proposal-class-properties", "react-hot-loader/babel"]
"stage-0",
"react"
],
"plugins": [
"react-hot-loader/babel"
]
} }

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>Redux TodoMVC</title>
</head>
<body>
<div class="todoapp" id="root">
</div>
</body>
<script src="bundle.js"></script>
</html>

View File

@ -1,15 +1,27 @@
{ {
"name": "todomvc", "name": "slider-todomvc",
"version": "0.0.0", "version": "0.0.0",
"description": "TodoMVC example for redux", "description": "TodoMVC example for redux",
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {
"start": "../../node_modules/.bin/webpack-dev-server", "start": "webpack-dev-server",
"build": "../../node_modules/.bin/webpack --config webpack.config.prod.js" "build": "webpack --config webpack.config.prod.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/calesce/redux-slider-monitor.git" "url": "https://github.com/calesce/redux-slider-monitor.git"
}, },
"license": "MIT" "license": "MIT",
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.3.0",
"@babel/preset-env": "^7.3.1",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"webpack": "^4.27.1",
"webpack-dev-server": "^3.1.14"
},
"dependencies": {
"redux-slider-monitor": "^2.0.0-2"
}
} }

View File

@ -21,20 +21,8 @@ module.exports = {
filename: 'bundle.js' filename: 'bundle.js'
}, },
plugins: [ plugins: [
new webpack.HotModuleReplacementPlugin(), new webpack.HotModuleReplacementPlugin()
new webpack.NoEmitOnErrorsPlugin()
], ],
resolve: {
alias: {
'redux-slider-monitor': path.join(
__dirname,
'..',
'..',
'src/SliderMonitor'
)
},
extensions: ['.js']
},
module: { module: {
rules: [ rules: [
{ {
@ -45,11 +33,7 @@ module.exports = {
}, },
{ {
test: /\.css?$/, test: /\.css?$/,
use: ['style-loader', 'raw-loader'], use: ['style-loader', 'raw-loader']
include: [
__dirname,
path.join(__dirname, '../../../../node_modules/todomvc-app-css')
]
} }
] ]
} }

View File

@ -35,7 +35,7 @@
"redux-devtools-log-monitor": "^1.0.1", "redux-devtools-log-monitor": "^1.0.1",
"redux-devtools": "^3.5.0", "redux-devtools": "^3.5.0",
"rimraf": "^2.3.4", "rimraf": "^2.3.4",
"style-loader": "^0.16.1", "style-loader": "^0.13.1",
"todomvc-app-css": "^2.0.1" "todomvc-app-css": "^2.0.1"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -17015,13 +17015,6 @@ style-loader@^0.13.0, style-loader@^0.13.1:
dependencies: dependencies:
loader-utils "^1.0.2" loader-utils "^1.0.2"
style-loader@^0.16.1:
version "0.16.1"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.16.1.tgz#50e325258d4e78421dd9680636b41e8661595d10"
integrity sha1-UOMlJY1OeEId2WgGNrQehmFZXRA=
dependencies:
loader-utils "^1.0.2"
style-loader@^0.23.1: style-loader@^0.23.1:
version "0.23.1" version "0.23.1"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925"