This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if cat package-lock.json.sum | sha256sum -c - | |
then | |
echo "is ok" | |
else | |
echo "Changes in the package-lock.json detected, running npm install" | |
npm install | |
echo "generating new sum" | |
sha256sum package-lock.json > package-lock.json.sum | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*globals document */ | |
/* | |
* https://developer.mozilla.org/en/docs/Web/API/Document/readyState | |
*/ | |
document.onreadystatechange = function () { | |
// The document has finished loading and the document has been parsed but sub-resources such as images, stylesheets and frames are still loading. | |
if (document.readyState === "interactive") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//events - a super-basic Javascript (publish subscribe) pattern | |
var events = { | |
events: {}, | |
on: function (eventName, fn) { | |
this.events[eventName] = this.events[eventName] || []; | |
this.events[eventName].push(fn); | |
}, | |
off: function(eventName, fn) { | |
if (this.events[eventName]) { |