abhi-plugin-gatsby-preview
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -18,9 +18,17 @@ "use strict"; | ||
socket.on("status", data => { | ||
console.log(`Received data for reload`, data); | ||
console.log(`Received data for status msg`, data); | ||
let event; | ||
if (data && data.event) { | ||
try { | ||
const jsonData = JSON.parse(data); | ||
event = jsonData && jsonData.event; | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
if (event) { | ||
showStatusBar(true); | ||
} | ||
if (data && data.event === "SUCCESS") { | ||
if (event === "SUCCESS") { | ||
setMessage("You Gatsby Preview is reloading..."); | ||
@@ -27,0 +35,0 @@ setTimeout(() => { |
{ | ||
"name": "abhi-plugin-gatsby-preview", | ||
"description": "A Gatsby plugin shows status of cloud preview", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"author": "Abhi Aiyer", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
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
2261
54