npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

chrome-tab-reloader

v1.1.25

Published

Chrome active tab reloader server

Downloads

25

Readme

#Chrome tab reloader plugin

This is Livereload alternative for non localhost working environments. So if you work in cloud based environment where you can only see the code result after it uploads to server, This module shall help you to reload the Chrome tab once your code is uploaded.

It shall work for you if you are using task runner like gulp,

Also you need any other npm tool to pair us with chrome-tab-reloader which uploads your code to server and gives you callback on this action with filename of a file which has just uploaded to server.

Here is an example of using chromeTabReloader in pair with dwdav and dw-utils plugins for Demandware platform:

var gulp = require("gulp"),
        dwdav = require('dwdav'),
        config = require('@tridnguyen/config'),
        gutil = require('gulp-util'),
        chromeTabReloader = require('chrome-tab-reloader'),
        tabReloaderInstance;

function upload(files) {
    var credentials = config('../dw.json', { caller: false });
    var server = dwdav(credentials);

    Promise.all(files.map(function(file) {
        return server.post(path.relative(process.cwd(), file));
    })).then(function() {
        tabReloaderInstance(files);
        gutil.log(gutil.colors.green('Uploaded ' + files.join(',') + ' to the server'));
    }).catch(function(err) {
        gutil.log(gutil.colors.red('Error uploading ' + files.join(','), err));
    });
}

var filesToWatchToUpload = [
        'some_app_of_yours/cartridge/**/*.{isml,json,properties,xml}',
        'some_app_of_yours/cartridge/scripts/**/*.{js,ds}',
        'some_app_of_yours/cartridge/static/**/*.{js,css,png,gif,jpg}',
        'some_app_of_yours_richUI/cartridge/**/*.{isml,json,properties,xml}',
        'some_app_of_yours_richUI/cartridge/scripts/**/*.{js,ds}',
        'some_app_of_yours_richUI/cartridge/static/**/*.{js,css,png,gif,jpg}'
    ];

gulp.task('watch:server', function() {
    tabReloaderInstance = new chromeTabReloader({
        port: 8001
    });

    gulp.watch(filesToWatchToUpload, { interval: 1000 }, function(event) {
        setTimeout(function() {
            upload([event.path]);
        }, 500);
    });
});

dw.json if file generated with dw-utils init command.

files is an array of file names of files being uploaded.

Once gulp watch:server command is on you will have tabReloader npm module waiting for chrome plugin to connect to it.

Once chromeTabReloader is installed in your browser you can click on the green circle icon in your extensions bar, it shall establish connection with running npm process.

Here is the page from which you can install cromeTabReloader plugin https://chrome.google.com/webstore/detail/tab-reloader/mnbfmcaflfdkgoaaggbpkhchojeinjpm

The tab on which you where while activating plugin shall be the one to reload once new file upload is spotted. You can activate it for multiple tabs at once.