Opal-Estate-Pro/node_modules/livereload-js/lib/startup.js
2019-09-13 11:27:52 +07:00

33 lines
765 B
JavaScript

(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);