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

@dhis2/deploy-build

v1.17.1

Published

Deploy build artifacts to a new/existing ${repo}-builds repository

Readme

build tools

deploy-build.sh

Deploys a build artifact from dhis2/$REPO_NAME to d2-ci/${REPO_NAME}. These builds can be pulled from NPM and can be built into the backend.

publish-build.sh

Publishes a build artifact to NPM if the $TRAVIS_TAG environment variable exists.

Cutting the release is done locally, then the tag is pushed.

Travis runs through the build process and then deploys the artifact to the builds repo, and then publishes the version to NPM.

Requirements

Setup

Create .travis.yml:

travis init

Add the encrypted PAT for the app:

travis encrypt GITHUB_TOKEN=<github access token here> --add
travis encrypt NPM_TOKEN=<npm access token here> --add

Example .travis.yml:

language: node_js
node_js:
- 8
before_script:
- npm install --global @dhis2/deploy-build
script:
- npm run lint
- npm run coverage
- npm run build
deploy:
- provider: script
  script: deploy-build
  skip_cleanup: true
  on:
    all_branches: true
- provider: script
  script: publish-build
  skip_cleanup: true
  on:
    tags: true
env:
  global:
    secure: <encrypted PAT>
    secure: <encrypted PAT>

Deploy manually to your own Github account

To deploy a build to your personal github account:

npm install --global @dhis2/deploy-build
export GITHUB_TOKEN=<github token>
deploy-build <github username>

Caveats

Turn off PR builds in Travis, only use branch builds

If you see commits like: c9e0584 Merge 46e1c4787... into 8741c7c88... in your builds repo and don't want them, then turn off the PR builds and just use branch builds.

Travis build the merge commit between the branch and the base, and set the TRAVIS_BRANCH env variable to the base branch, which often means master.

By leaving the PR builds off and the branch buils on you still get the benefits of your branch being built and deployed, but avoid the merge commit builds in your master stream.

Install dependency from GitHub, e.g. for DHIS2 core

# for master branch
npm install ${app}@dhis2/${app}

# for 2.30
npm install ${app}@dhis2/${app}#2.30

# for random feature branch
npm install ${app}@dhis2/${app}#feature/random-branch-name