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 🙏

© 2022 – Pkg Stats / Ryan Hefner

ophan-tracker-js

v1.4.0

Published

Browser JavaScript client for Ophan.

Downloads

6,634

Readme

Ophan Tracker JS

Browser JavaScript client for Ophan.

Install

$ npm install ophan-tracker-js

Contribute

Proxy tracker-ts:

  1. Install dependencies

    $ brew install lighttpd
    .../ophan/tracker-js $ npm install
  2. In one terminal window:

    .../ophan/tracker-js $ grunt
    .../ophan/tracker-js $ grunt watch
    
  3. In another terminal window:

    .../ophan/tracker-js $ lighttpd -f lighttpd.conf -D
  4. Install FoxyProxy (https://getfoxyproxy.org/downloads/) in your browser and create a rule that forces j.ophan.co.uk to localhost 8000. (For me FoxyProxy needed a few switches on and off before it decided to start talking to lighttpd.)

  5. In another terminal window, start a server that is running the Guardian frontend

  6. Navigate to where you are running the Guardian locally (e.g. https://localhost:9000/uk)

  7. Ensure FoxyProxy is enabled

  8. Develop with pleasure

Publish

Two formats for release

When you make a change to Tracker JS, you must release on both these systems:

  • The NPM package ophan-tracker-js, commonly used on internally developed Guardian sites like Guardian Frontend and Support Frontend.
  • https://j.ophan.co.uk/ - CDN/S3, deployed through RiffRaff and used by some Guardian sites like https://jobs.theguardian.com/. An advantage of this approach is that sites using it immediately get Tracker JS updates, without developer intervention.

Ensure that before you merge a change, you first bump the version in package.json. Please make sure you update the changes.md file too. If you have added a new Ophan client to support a new platform, please add the path to the built output file to the files list in package.json.

Publish to NPM

Whenever the Tracker script is changed, its ophan-tracker-js NPM package will need to be updated to a new version.

If you don't already have an NPM account, be sure to set up two-factor authentification.

Log into NPM

$ npm login

Compile

.../ophan/tracker-js $ npm install

Publish

.../ophan/tracker-js $ npm publish

You will need to be added as an owner of ophan-tracker-js. To find the current owners:

$ npm owner ls ophan-tracker-js 

To add someone as an owner:

npm owner add npm.username ophan-tracker-js

More information on setting owners is available in NPM's documentation.