bs-pretty-message

Overlay a fullscreen message to all browsers, but maintained.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
bs-pretty-message
1.0.86 years ago6 years agoMinified + gzip package size for bs-pretty-message in KB

Readme

bs-pretty-message


Overlay a fullscreen message to all browsers. Useful for showing errors from webpack/browserify/gulp, etc.

Install

NOTE: It needs browser-sync as peer dependency.

$ npm i bs-pretty-message --save-dev

Usage

var browserSync = require('browser-sync').create();

browserSync.init({
    server: 'test/fixtures',
    plugins: ['bs-pretty-message']
});

// Emit an event to connected clients
setTimeout(function () {
    browserSync.sockets.emit('fullscreen:message', {
      title: "Hello from Example",
      body:  '10 seconds have elapsed!'
    });
}, 5000);

Related

License

MIT © Kiko Beats.