Opal-Estate-Pro/node_modules/livereload-js/lib/startup.js

33 lines
765 B
JavaScript
Raw Normal View History

2019-09-13 06:27:52 +02:00
(function() {
var CustomEvents, LiveReload, k;
CustomEvents = require('./customevents');
LiveReload = window.LiveReload = new (require('./livereload').LiveReload)(window);
for (k in window) {
if (k.match(/^LiveReloadPlugin/)) {
LiveReload.addPlugin(window[k]);
}
}
LiveReload.addPlugin(require('./less'));
LiveReload.on('shutdown', function() {
return delete window.LiveReload;
});
LiveReload.on('connect', function() {
return CustomEvents.fire(document, 'LiveReloadConnect');
});
LiveReload.on('disconnect', function() {
return CustomEvents.fire(document, 'LiveReloadDisconnect');
});
CustomEvents.bind(document, 'LiveReloadShutDown', function() {
return LiveReload.shutDown();
});
}).call(this);