webpack-hot-middleware
Advanced tools
Comparing version 2.21.2 to 2.22.0
@@ -14,2 +14,3 @@ /*eslint-env browser*/ | ||
overlayStyles: {}, | ||
overlayWarnings: false, | ||
ansiColors: {} | ||
@@ -66,2 +67,6 @@ }; | ||
if (overrides.overlayStyles) options.overlayStyles = JSON.parse(overrides.overlayStyles); | ||
if (overrides.overlayWarnings) { | ||
options.overlayWarnings = overrides.overlayWarnings == 'true'; | ||
} | ||
} | ||
@@ -205,3 +210,5 @@ | ||
} | ||
if (overlay && type !== 'warnings') overlay.showProblems(type, obj[type]); | ||
if (overlay && (options.overlayWarnings || type !== 'warnings')) { | ||
overlay.showProblems(type, obj[type]); | ||
} | ||
}, | ||
@@ -245,9 +252,7 @@ success: function() { | ||
if (reporter) reporter.problems('errors', obj); | ||
} else if (obj.warnings.length > 0) { | ||
if (reporter) reporter.problems('warnings', obj); | ||
} else { | ||
if (reporter) { | ||
if (obj.warnings.length > 0) { | ||
reporter.problems('warnings', obj); | ||
} else { | ||
reporter.cleanProblemsCache(); | ||
} | ||
reporter.cleanProblemsCache(); | ||
reporter.success(); | ||
@@ -254,0 +259,0 @@ } |
{ | ||
"name": "webpack-hot-middleware", | ||
"version": "2.21.2", | ||
"version": "2.22.0", | ||
"description": "Webpack hot reloading you can attach to your own server", | ||
@@ -18,3 +18,7 @@ "keywords": [ | ||
"test": "mocha", | ||
"travis": "istanbul cover _mocha --", | ||
"security": "nsp check", | ||
"ci:lint": "npm run lint && npm run security", | ||
"ci:test": "npm run test", | ||
"ci:coverage": "npm run test:coverage", | ||
"test:coverage": "istanbul cover _mocha --", | ||
"lint": "eslint . --max-warnings 0" | ||
@@ -24,3 +28,3 @@ }, | ||
"type": "git", | ||
"url": "https://github.com/glenjamin/webpack-hot-middleware.git" | ||
"url": "https://github.com/webpack-contrib/webpack-hot-middleware.git" | ||
}, | ||
@@ -36,3 +40,2 @@ "author": "Glen Mailer <glen@stainlessed.co.uk>", | ||
"devDependencies": { | ||
"coveralls": "^2.11.2", | ||
"eslint": "^4.6.1", | ||
@@ -42,2 +45,3 @@ "express": "^4.13.3", | ||
"mocha": "^2.3.2", | ||
"nsp": "^3.2.1", | ||
"sinon": "^1.12.2", | ||
@@ -44,0 +48,0 @@ "supertest": "^1.1.0" |
@@ -9,3 +9,3 @@ # Webpack Hot Middleware | ||
[![npm version](https://img.shields.io/npm/v/webpack-hot-middleware.svg)](https://www.npmjs.com/package/webpack-hot-middleware) [![Build Status](https://img.shields.io/travis/glenjamin/webpack-hot-middleware/master.svg)](https://travis-ci.org/glenjamin/webpack-hot-middleware) [![Coverage Status](https://coveralls.io/repos/glenjamin/webpack-hot-middleware/badge.svg?branch=master)](https://coveralls.io/r/glenjamin/webpack-hot-middleware?branch=master) ![MIT Licensed](https://img.shields.io/npm/l/webpack-hot-middleware.svg) | ||
[![npm version](https://img.shields.io/npm/v/webpack-hot-middleware.svg)](https://www.npmjs.com/package/webpack-hot-middleware) [![CircleCI](https://circleci.com/gh/webpack-contrib/webpack-hot-middleware/tree/master.svg?style=svg)](https://circleci.com/gh/webpack-contrib/webpack-hot-middleware/tree/master)[![codecov](https://codecov.io/gh/webpack-contrib/webpack-hot-middleware/branch/master/graph/badge.svg)](https://codecov.io/gh/webpack-contrib/webpack-hot-middleware)![MIT Licensed](https://img.shields.io/npm/l/webpack-hot-middleware.svg) | ||
@@ -97,5 +97,6 @@ ## Installation & Usage | ||
* **overlayStyles** - An object to let you override or add new inline styles to the client overlay div. | ||
* **overlayWarnings** - Set to `true` to enable client overlay on warnings in addition to errors. | ||
> Note: | ||
> Since the `ansiColors` and `overlaySyles` options are passed via query string, you'll need to uri encode your stringified options like below: | ||
> Since the `ansiColors` and `overlayStyles` options are passed via query string, you'll need to uri encode your stringified options like below: | ||
@@ -178,7 +179,7 @@ ```js | ||
If you want to use this module with browsers that don't support eventsource, you'll need to use a [polyfill](https://libraries.io/search?platforms=NPM&q=eventsource+polyfill). See [issue #11](https://github.com/glenjamin/webpack-hot-middleware/issues/11) | ||
If you want to use this module with browsers that don't support eventsource, you'll need to use a [polyfill](https://libraries.io/search?platforms=NPM&q=eventsource+polyfill). See [issue #11](https://github.com/webpack-contrib/webpack-hot-middleware/issues/11) | ||
### Not receiving updates in client when using Gzip | ||
This is because gzip generally buffers the response, but the Server Sent Events event-stream expects to be able to send data to the client immediately. You should make sure gzipping isn't being applied to the event-stream. See [issue #10](https://github.com/glenjamin/webpack-hot-middleware/issues/10). | ||
This is because gzip generally buffers the response, but the Server Sent Events event-stream expects to be able to send data to the client immediately. You should make sure gzipping isn't being applied to the event-stream. See [issue #10](https://github.com/webpack-contrib/webpack-hot-middleware/issues/10). | ||
@@ -202,4 +203,2 @@ ### Use with auto-restarting servers | ||
Copyright 2015 Glen Mailer. | ||
MIT Licensed. | ||
See [LICENSE file](LICENSE). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29557
8
588
1
201