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 🙏

© 2026 – Pkg Stats / Ryan Hefner

flit-contrib-flightplan

v0.0.7

Published

Flit flightplan plugin

Readme

flit-contrib-flightplan

Flightplan plugin for using flightplan for streamlining application deployment or systems administration tasks.

Getting Started

Install plugin with this command:

npm install flit-contrib-flightplan --save-dev

Once the plugin has been installed, it may be enabled inside your flitfile with this line of JavaScript:

flit.loadNpmPlugin('flit-contrib-flightplan');

Or using load-flit-plugins to auto load all plugins included in package.json.

Sample flitfile.js



module.exports = function (flit) {
  require('load-flit-plugins')(flit);

  var tmpDir = 'sample-com-' + new Date().getTime();

  flit.init({
    debug: false,
    destinations: {
      'staging': {
        host: 'staging.sample.com',
        username: 'sample',
        agent: process.env.SSH_AUTH_SOCK
      },
      'production': [
        {
          host: 'www1.sample.com',
          username: 'sample',
          agent: process.env.SSH_AUTH_SOCK
        },
        {
          host: 'www2.sample.com',
          username: 'sample',
          agent: process.env.SSH_AUTH_SOCK
        }
      ]
    }
  });

  // `c` is the context object.
  // The flit-contrib-flightplan plugin extended the context object with two function: `local` and `remote`.
  // More about local and remote usage to visit: https://github.com/pstadler/flightplan
  flit.task(function (c) {
    // run commands on localhost
    c.local(function(local) {
      local.log('Run build');
      local.exec('gulp build');

      local.log('Copy files to remote hosts');
      var filesToCopy = local.exec('git ls-files', {silent: true});
      // rsync files to all the destination's hosts
      local.transfer(filesToCopy, '/tmp/' + tmpDir);
    });

    // run commands on remote hosts (destinations)
    c.remote(function(remote) {
      remote.log('Move folder to web root');
      remote.sudo('cp -R /tmp/' + tmpDir + ' ~', {user: 'www'});
      remote.rm('-rf /tmp/' + tmpDir);

      remote.log('Install dependencies');
      remote.sudo('npm --production --prefix ~/' + tmpDir
                                + ' install ~/' + tmpDir, {user: 'www'});

      remote.log('Reload application');
      remote.sudo('ln -snf ~/' + tmpDir + ' ~/sample-sh', {user: 'www'});
      remote.sudo('pm2 reload sample-sh', {user: 'www'});
    });

    // run more commands on localhost afterwards
    c.local(function(local) { /* ... */ });
    // ...or on remote hosts
    c.remote(function(remote) { /* ... */ });
  });
});