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 🙏

© 2025 – Pkg Stats / Ryan Hefner

gh-pages-travis

v1.0.4

Published

CLI to deploy a folder to gh-pages branch of current repo as part of travis build

Readme

gh-pages-travis

CLI to deploy a folder to gh-pages branch of current repo as part of travis build

Usage

Install as a development dependency

npm install --save-dev gh-pages-travis

Add a script entry to package.json (npm puts the node_modules/.bin directory on the path when it runs scripts)

{
  "scripts": {
    "gh-pages-travis": "gh-pages-travis"
  }
}

Create your gh-pages branch and add the following .travis.yml to prevent travis from building it

branches:
  except:
    - gh-pages

Generate a deploy key for your Github repository

ssh-keygen -t rsa -C "[email protected]"

This will generate the id_rsa and id_rsa.pub files

Add id_rsa.pub as a deploy key for your Github repository

Install the travis cli client

gem install travis

Login the travis cli and encrypt the private key, id_rsa

travis login
travis encrypt-file id_rsa --add

This will add the decrypt command to recreate id_rsa in the current folder as a before_install script

NB. Make sure you delete the id_rsa and id_rsa.pub files and add the id_rsa.enc to the repository.

Lastly update your .travis.yml to configure the script and run it after a successful build

after_sucess:
  - npm run gh-pages-travis
env:
  global:
    - DEPLOY_BRANCH="master"
    - SOURCE_DIR="doc"
    - TARGET_BRANCH="gh-pages"
    - SSH_KEY="id_rsa"
    - GIT_NAME="travis"
    - GIT_EMAIL="[email protected]"

All the environment variables are optional but it's likely that 1 or more will need to be set.

  • DEPLOY_BRANCH defaults to master. It ensures that the github pages are only deployed from builds of this branch.
  • SOURCE_DIR defaults to doc. It is likely that this will need to be changed to the directory in which the actual site source is built.
  • TARGET_BRANCH defaults to gh-pages. Typically this can be changed to master to deploy to the master branch of a xxxxx.github.io repository.
  • SSH_KEY defaults to id_rsa. It would only need to be set if a different name was used for the SSH key to that documented above.
  • GIT_NAME defaults to travis. This is the name that will be used for git commits, you probably want to change this.
  • GIT_EMAIL defaults to [email protected]. This is the email that will be used for git commits, you probably want to change this.