Wondering what’s next for npm?Check out our public roadmap! »

    bs-snippet-injector

    2.0.1 • Public • Published

    bs-snippet-injector

    Write & Remove the BrowserSync Snippet to a file

    This is an alternative to using the BrowserSync proxy.

    Install

    $ npm install browser-sync bs-snippet-injector

    Example

    // requires version 1.3.3 of BrowserSync or higher.
    var browserSync = require("browser-sync");
     
    // register the plugin
    browserSync.use(require("bs-snippet-injector"), {
        // path to the file containing the closing </body> tag
        file: "app/design/frontend/project/template/page/1column.phtml" 
    });
     
    // now run BrowserSync, wathching CSS files.
    browserSync({
      files: "skin/frontend/project/assets/css/*.css"
    });

    Keywords

    Install

    npm i bs-snippet-injector

    DownloadsWeekly Downloads

    532,954

    Version

    2.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar