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

hp4t

v0.3.6

Published

Deploy and provision application to Heroku with pipelines for Travis CI

Downloads

20

Readme

HP4T

Usage

Usage:

hp4t <command> [options]

Commands:

  • help - display help
  • init <language> - initialize project
  • export <application> - Export Heroku application configuration
  • export-pipeline <pipeline> - Export Heroku pipeline configuration
  • provision-pipeline - Configure Heroku pipelines
  • provision <environment> - Configure Heroku application
  • deploy <environment> - Deploy application
  • promote <environment> - Promote application to next environment
  • run-remote <environment> <command> - Run command on Heroku
  • run-local <environment> <command> - Run command locally
  • notify-rollbar - Notify Rollbar about deployment

Options:

  • --branch <branch_name> - deploy only from a specific branch
  • --tags - deploy only from tags
  • --slug <slug_name> - deploy only from specific repository slug

Example .travis.yml flow

Trunk base development:

language: node_js
node_js: 6
env:
  global:
  # ROLLBAR_DEPLOY_KEY
  - secure: ""
  # HEROKU_API_KEY
  - secure: ""
cache:
  apt: true
  directories:
  - node_modules
install:
- npm install
- alias hp4t="$(npm bin)/hp4t"
before_script:
- npm test
- hp4t provision-pipeline
- hp4t provision stage
- hp4t run stage "migrate database"
- hp4t deploy stage
- hp4t provision production
- hp4t promote stage # to production
- hp4t run production "migrate database"
script:
- /bin/true
after_success:
- hp4t notify-rollbar

With feature branch:

language: node_js
node_js:
- 6.0
env:
  global:
  # ROLLBAR_DEPLOY_KEY
  - secure: ""
  # HEROKU_API_KEY
  - secure: ""
cache:
  apt: true
  directories:
  - node_modules
install:
- npm install
- alias hp4t="$(npm bin)/hp4t"
before_script:
- npm test
- hp4t provision-pipeline
- hp4t provision stage
- hp4t run stage "migrate database"
- hp4t deploy stage
- hp4t provision production
- hp4t promote stage # to production
- hp4t run production "migrate database"
- hp4t deploy featureX --branch featureX
script:
- /bin/true
after_success:
- hp4t notify-rollbar

Continuous delivery (deploy on tag):

language: node_js
node_js:
- 6.0
env:
  global:
  # ROLLBAR_DEPLOY_KEY
  - secure: ""
  # HEROKU_API_KEY
  - secure: ""
cache:
  apt: true
  directories:
  - node_modules
install:
- npm install
- alias hp4t="$(npm bin)/hp4t"
before_script:
- npm test
- hp4t provision stage --branch develop
- hp4t run stage "migrate database" --branch develop
- hp4t deploy stage --branch develop
- hp4t provision production --tags --branch master
- hp4t deploy production --tags --branch master # to production
- hp4t run production "migrate database" --tags --branch master
- hp4t deploy featureX --branch featureX
script:
- /bin/true
after_success:
- hp4t notify-rollbar

Configuration

File: .hp4t.yaml, format YAML.

Example:

infrastructure:
- dir: infrastructure/
environments:
  default:
  - slug: wojtekk/hp4t
  - branch: master
  stage:
  - app: app_name-stage
  - branch: develop
  - tags: false
  production:
  - app: app_name
  - branch: master
  - tags: true