malta-browser-refresh

1.2.16 • Public • Published

npm version npm downloads npm downloads

This plugin can be used on: .html files and even on .md and .pug files after using the right plugin

It observers js and css files with a relative path and refreshes the browser automatically when one of those changes.

Options :
- mode : decide use the xhr mode or the ws mode; default is ws

warning : use this plugin only for development purposes

Sample usage:

malta app/source/index.html public -plugins=malta-browser-refresh[mode:\"xhr\"]

or in the .json file :

"app/source/index.html" : "public -plugins=malta-browser-refresh"

or in a script :

var Malta = require('malta');
Malta.get().check([
    'app/source/index.html',
    'public',
    '-plugins=malta-browser-refresh',
    '-options=showPath:false,watchInterval:500,verbose:0'
    ]).start(function (o) {
        var s = this;
        console.log('name : ' + o.name)
        console.log("content : \n" + o.content);
        'plugin' in o && console.log("plugin : " + o.plugin);
        console.log('=========');
    });

/malta-browser-refresh/

    Package Sidebar

    Install

    npm i malta-browser-refresh

    Weekly Downloads

    40

    Version

    1.2.16

    License

    MIT

    Unpacked Size

    9.33 kB

    Total Files

    5

    Last publish

    Collaborators

    • fedeghe