bs-eslint-message
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -17,3 +17,3 @@ // replace bs-fullscreen-message with this shit | ||
} | ||
if (!msg.styleEl) addStyles() | ||
addStyles() | ||
addMessage({ title: 'ESLINT ERRORS', body: parseErrors(results) }) | ||
@@ -23,3 +23,3 @@ }) | ||
socket.on('msg', data => { | ||
if (!msg.styleEl) addStyles() | ||
addStyles() | ||
addMessage(data) | ||
@@ -29,3 +29,3 @@ }) | ||
function removeMsg () { | ||
msg.el.parentNode.removeChild(msg.el) | ||
if (msg.el) msg.el.parentNode.removeChild(msg.el) | ||
} | ||
@@ -45,2 +45,3 @@ | ||
function addStyles () { | ||
if (msg.styleEl) return | ||
document.head.innerHTML += ` | ||
@@ -79,3 +80,3 @@ <style id="${msg.styleId}"> | ||
function addMessage ({ title, body }) { | ||
if (msg.el) removeMsg() | ||
removeMsg() | ||
document.body.innerHTML += ` | ||
@@ -82,0 +83,0 @@ <div id="${msg.elId}"> |
{ | ||
"name": "bs-eslint-message", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "BrowserSync plugin to display eslint errors (or any other message) within connected browsers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
82
5446